From cc507f8ae8ef0d44703f3b35fa9064d4a6cf2225 Mon Sep 17 00:00:00 2001 From: Vasek Mlejnsky Date: Thu, 2 Aug 2018 11:44:52 +0200 Subject: [PATCH] Update TrezorDevice's `isUsedElsewhere` & `unacquired` properties - both properties are now deprecated - following properties are now used instead (matching trezor-connect): - `type` with possible values `acquired` | `unacquired` | `unreadable` - `status` with possible values `available` | `occupied` | `used` --- src/flowtype/index.js | 2 +- src/js/actions/TrezorConnectActions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flowtype/index.js b/src/flowtype/index.js index 74d33214..6b85a8a9 100644 --- a/src/flowtype/index.js +++ b/src/flowtype/index.js @@ -68,7 +68,7 @@ export type UnknownDevice = $Exact<{ +label: string, +features: null, state: ?string, - + remember: boolean; // device should be remembered connected: boolean; // device is connected available: boolean; // device cannot be used because of features.passphrase_protection is different then expected diff --git a/src/js/actions/TrezorConnectActions.js b/src/js/actions/TrezorConnectActions.js index 1aa9eac3..88fa0cc1 100644 --- a/src/js/actions/TrezorConnectActions.js +++ b/src/js/actions/TrezorConnectActions.js @@ -173,7 +173,7 @@ export const postInit = (): ThunkAction => (dispatch: Dispatch, getState: GetSta } else { if (devices.length > 0) { - const unacquired: ?TrezorDevice = devices.find(d => d.unacquired); + const unacquired: ?TrezorDevice = devices.find(d => d.type === 'unacquired'); if (unacquired) { dispatch( onSelectDevice(unacquired) ); } else {