mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-03 21:00:55 +00:00
quickfix: COMMITHASH and LOCAL are not window variables, use flowtype declaration
This commit is contained in:
parent
113fd6eff8
commit
6a14601ddd
@ -82,6 +82,8 @@ export type TrezorConnectAction = {
|
||||
state: ?string,
|
||||
};
|
||||
|
||||
declare var LOCAL: ?string;
|
||||
|
||||
export const init = (): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
||||
// set listeners
|
||||
TrezorConnect.on(DEVICE_EVENT, (event: DeviceMessage): void => {
|
||||
@ -120,7 +122,7 @@ export const init = (): AsyncAction => async (dispatch: Dispatch, getState: GetS
|
||||
});
|
||||
});
|
||||
|
||||
window.__TREZOR_CONNECT_SRC = typeof window.LOCAL === 'string' ? window.LOCAL : 'https://sisyfos.trezor.io/connect/'; // eslint-disable-line no-underscore-dangle
|
||||
window.__TREZOR_CONNECT_SRC = typeof LOCAL === 'string' ? LOCAL : 'https://sisyfos.trezor.io/connect/'; // eslint-disable-line no-underscore-dangle
|
||||
// window.__TREZOR_CONNECT_SRC = typeof LOCAL === 'string' ? LOCAL : 'https://connect.trezor.io/5/'; // eslint-disable-line no-underscore-dangle
|
||||
|
||||
try {
|
||||
|
@ -11,6 +11,8 @@ import { connect } from 'react-redux';
|
||||
import colors from 'config/colors';
|
||||
import * as LogActions from 'actions/LogActions';
|
||||
|
||||
declare var COMMITHASH: string;
|
||||
|
||||
type Props = {
|
||||
opened: boolean,
|
||||
toggle: () => any,
|
||||
@ -37,7 +39,7 @@ const Copy = styled.div`
|
||||
|
||||
const Footer = ({ opened, toggle }: Props) => (
|
||||
<Wrapper>
|
||||
<Copy title={window.COMMITHASH}>© {getYear(new Date())}</Copy>
|
||||
<Copy title={COMMITHASH}>© {getYear(new Date())}</Copy>
|
||||
<StyledLink href="http://satoshilabs.com" isGreen>SatoshiLabs</StyledLink>
|
||||
<StyledLink href="/assets/tos.pdf" isGreen>Terms</StyledLink>
|
||||
<StyledLink onClick={toggle} isGreen>{ opened ? 'Hide Log' : 'Show Log' }</StyledLink>
|
||||
|
@ -174,6 +174,3 @@ export type PromiseAction<R> = ReduxPromiseAction<State, Action, R>;
|
||||
|
||||
export type Store = ReduxStore<State, Action>;
|
||||
export type GetState = () => State;
|
||||
|
||||
declare var LOCAL: string;
|
||||
declare var COMMITHASH: string;
|
Loading…
Reference in New Issue
Block a user