fixed getSelecedDevice in WalletService

pull/2/merge
Szymon Lesisz 6 years ago
parent 053b12d3ff
commit 751a96ccc1

@ -24,7 +24,16 @@ const getSelectedDevice = (state: State): ?TrezorDevice => {
if (!locationState.device) return null;
const instance: ?number = locationState.deviceInstance ? parseInt(locationState.deviceInstance) : undefined;
return state.connect.devices.find(d => d.features && d.features.device_id === locationState.device && d.instance === instance);
return state.connect.devices.find(d => {
if (d.unacquired && d.path === locationState.device) {
return true;
} else if (d.features && d.features.bootloader_mode && d.path === locationState.device) {
return true;
} else if (d.features && d.features.device_id === locationState.device && d.instance === instance) {
return true;
}
return false;
});
}
/**

Loading…
Cancel
Save