mirror of
https://github.com/trezor/trezor-wallet
synced 2025-05-21 16:28:49 +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,
|
state: ?string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
declare var LOCAL: ?string;
|
||||||
|
|
||||||
export const init = (): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
export const init = (): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
||||||
// set listeners
|
// set listeners
|
||||||
TrezorConnect.on(DEVICE_EVENT, (event: DeviceMessage): void => {
|
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
|
// window.__TREZOR_CONNECT_SRC = typeof LOCAL === 'string' ? LOCAL : 'https://connect.trezor.io/5/'; // eslint-disable-line no-underscore-dangle
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -11,6 +11,8 @@ import { connect } from 'react-redux';
|
|||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import * as LogActions from 'actions/LogActions';
|
import * as LogActions from 'actions/LogActions';
|
||||||
|
|
||||||
|
declare var COMMITHASH: string;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
opened: boolean,
|
opened: boolean,
|
||||||
toggle: () => any,
|
toggle: () => any,
|
||||||
@ -37,7 +39,7 @@ const Copy = styled.div`
|
|||||||
|
|
||||||
const Footer = ({ opened, toggle }: Props) => (
|
const Footer = ({ opened, toggle }: Props) => (
|
||||||
<Wrapper>
|
<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="http://satoshilabs.com" isGreen>SatoshiLabs</StyledLink>
|
||||||
<StyledLink href="/assets/tos.pdf" isGreen>Terms</StyledLink>
|
<StyledLink href="/assets/tos.pdf" isGreen>Terms</StyledLink>
|
||||||
<StyledLink onClick={toggle} isGreen>{ opened ? 'Hide Log' : 'Show Log' }</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 Store = ReduxStore<State, Action>;
|
||||||
export type GetState = () => State;
|
export type GetState = () => State;
|
||||||
|
|
||||||
declare var LOCAL: string;
|
|
||||||
declare var COMMITHASH: string;
|
|
Loading…
Reference in New Issue
Block a user