quickfix: COMMITHASH and LOCAL are not window variables, use flowtype declaration

pull/167/head
Szymon Lesisz 6 years ago
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}>&copy; {getYear(new Date())}</Copy>
<Copy title={COMMITHASH}>&copy; {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…
Cancel
Save