remove WALLET_TYPE request if device.features.passphrase_always_on_device

tmp/erc20-autoload
Szymon Lesisz 4 years ago
parent b0983994cd
commit 75393c22aa

@ -184,10 +184,18 @@ export const requestWalletType = (): AsyncAction => async (
if (!isDeviceReady) return; if (!isDeviceReady) return;
if (selected.features && selected.features.passphrase_protection) { if (selected.features && selected.features.passphrase_protection) {
dispatch({ if (selected.features.passphrase_always_on_device) {
type: CONNECT.REQUEST_WALLET_TYPE, dispatch({
device: selected, type: CONNECT.RECEIVE_WALLET_TYPE,
}); device: selected,
hidden: true,
});
} else {
dispatch({
type: CONNECT.REQUEST_WALLET_TYPE,
device: selected,
});
}
} else { } else {
dispatch({ dispatch({
type: CONNECT.RECEIVE_WALLET_TYPE, type: CONNECT.RECEIVE_WALLET_TYPE,
@ -357,8 +365,16 @@ export const duplicateDeviceOld = (device: TrezorDevice): AsyncAction => async (
export const duplicateDevice = (device: TrezorDevice): AsyncAction => async ( export const duplicateDevice = (device: TrezorDevice): AsyncAction => async (
dispatch: Dispatch dispatch: Dispatch
): Promise<void> => { ): Promise<void> => {
dispatch({ if (device.features && device.features.passphrase_always_on_device) {
type: CONNECT.REQUEST_WALLET_TYPE, dispatch({
device, type: CONNECT.RECEIVE_WALLET_TYPE,
}); device,
hidden: true,
});
} else {
dispatch({
type: CONNECT.REQUEST_WALLET_TYPE,
device,
});
}
}; };

Loading…
Cancel
Save