From 83523cf6775a88e3731d1bb51d9aa74f442d2070 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Fri, 17 Aug 2018 15:24:47 +0200 Subject: [PATCH] import Device type from 'flowtype' module --- src/js/actions/ModalActions.js | 3 +-- src/js/actions/TrezorConnectActions.js | 2 +- src/js/actions/WalletActions.js | 2 +- src/js/reducers/DevicesReducer.js | 3 +-- src/js/reducers/TrezorConnectReducer.js | 3 +-- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/js/actions/ModalActions.js b/src/js/actions/ModalActions.js index ba73a0dd..b6254ce5 100644 --- a/src/js/actions/ModalActions.js +++ b/src/js/actions/ModalActions.js @@ -2,12 +2,11 @@ import TrezorConnect, { UI, UI_EVENT } from 'trezor-connect'; -import type { Device } from 'trezor-connect'; import * as MODAL from './constants/modal'; import * as CONNECT from './constants/TrezorConnect'; import type { - ThunkAction, AsyncAction, Action, GetState, Dispatch, TrezorDevice, + ThunkAction, AsyncAction, Action, GetState, Dispatch, Device, TrezorDevice, } from '~/flowtype'; import type { State } from '../reducers/ModalReducer'; diff --git a/src/js/actions/TrezorConnectActions.js b/src/js/actions/TrezorConnectActions.js index 7b25dc9c..71f919a5 100644 --- a/src/js/actions/TrezorConnectActions.js +++ b/src/js/actions/TrezorConnectActions.js @@ -16,7 +16,6 @@ import { resolveAfter } from '../utils/promiseUtils'; import type { - Device, DeviceMessage, UiMessage, TransportMessage, @@ -31,6 +30,7 @@ import type { Action, ThunkAction, AsyncAction, + Device, TrezorDevice, RouterLocationState, } from '~/flowtype'; diff --git a/src/js/actions/WalletActions.js b/src/js/actions/WalletActions.js index 65b4a7d3..58aa0910 100644 --- a/src/js/actions/WalletActions.js +++ b/src/js/actions/WalletActions.js @@ -6,7 +6,6 @@ import * as WALLET from './constants/wallet'; import * as CONNECT from './constants/TrezorConnect'; import * as stateUtils from '../reducers/utils'; -import type { Device } from 'trezor-connect'; import type { Account, @@ -14,6 +13,7 @@ import type Discovery, Token, Web3Instance, + Device, TrezorDevice, RouterLocationState, ThunkAction, diff --git a/src/js/reducers/DevicesReducer.js b/src/js/reducers/DevicesReducer.js index 171143bb..262662d3 100644 --- a/src/js/reducers/DevicesReducer.js +++ b/src/js/reducers/DevicesReducer.js @@ -2,12 +2,11 @@ import { TRANSPORT, DEVICE } from 'trezor-connect'; -import type { Device } from 'trezor-connect'; import * as CONNECT from '../actions/constants/TrezorConnect'; import * as WALLET from '../actions/constants/wallet'; import { getDuplicateInstanceNumber } from './utils'; -import type { Action, TrezorDevice } from '~/flowtype'; +import type { Action, Device, TrezorDevice } from '~/flowtype'; export type State = Array; diff --git a/src/js/reducers/TrezorConnectReducer.js b/src/js/reducers/TrezorConnectReducer.js index 285b7730..02a96352 100644 --- a/src/js/reducers/TrezorConnectReducer.js +++ b/src/js/reducers/TrezorConnectReducer.js @@ -2,11 +2,10 @@ import { TRANSPORT, DEVICE, UI } from 'trezor-connect'; -import type { Device } from 'trezor-connect'; import * as CONNECT from '../actions/constants/TrezorConnect'; import * as WALLET from '../actions/constants/wallet'; -import type { Action, TrezorDevice } from '~/flowtype'; +import type { Action, Device, TrezorDevice } from '~/flowtype'; export type SelectedDevice = { id: string; // could be device path if unacquired or features.device_id