From 42b7d6b3f0ae732de4cad466145390b9a019db4c Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 12 Apr 2019 16:18:15 +0200 Subject: [PATCH] fix lint --- src/actions/ImportAccountActions.js | 8 +++++--- src/reducers/utils/index.js | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/actions/ImportAccountActions.js b/src/actions/ImportAccountActions.js index 21a72088..5e673f60 100644 --- a/src/actions/ImportAccountActions.js +++ b/src/actions/ImportAccountActions.js @@ -21,12 +21,14 @@ export type ImportAccountAction = error: ?string, }; - const findIndex = (accounts: Array, network: Network, device: TrezorDevice): number => { return accounts.filter( - a => a.imported === true && a.network === network.shortcut && a.deviceID === (device.features|| {}).device_id + a => + a.imported === true && + a.network === network.shortcut && + a.deviceID === (device.features || {}).device_id ).length; -} +}; export const importAddress = ( address: string, diff --git a/src/reducers/utils/index.js b/src/reducers/utils/index.js index 13b74967..e14862e9 100644 --- a/src/reducers/utils/index.js +++ b/src/reducers/utils/index.js @@ -92,7 +92,8 @@ export const getSelectedAccount = (state: State): ?Account => { return state.accounts.find( a => a.imported === isImported && - (a.deviceState === device.state || a.imported) && + (a.deviceState === device.state || + (a.imported && a.deviceID === (device.features || {}).device_id)) && a.index === index && a.network === locationState.network );