mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-14 04:19:09 +00:00
remove WALLET_TYPE request if device.features.passphrase_always_on_device
This commit is contained in:
parent
b0983994cd
commit
75393c22aa
@ -184,10 +184,18 @@ export const requestWalletType = (): AsyncAction => async (
|
||||
if (!isDeviceReady) return;
|
||||
|
||||
if (selected.features && selected.features.passphrase_protection) {
|
||||
dispatch({
|
||||
type: CONNECT.REQUEST_WALLET_TYPE,
|
||||
device: selected,
|
||||
});
|
||||
if (selected.features.passphrase_always_on_device) {
|
||||
dispatch({
|
||||
type: CONNECT.RECEIVE_WALLET_TYPE,
|
||||
device: selected,
|
||||
hidden: true,
|
||||
});
|
||||
} else {
|
||||
dispatch({
|
||||
type: CONNECT.REQUEST_WALLET_TYPE,
|
||||
device: selected,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
dispatch({
|
||||
type: CONNECT.RECEIVE_WALLET_TYPE,
|
||||
@ -357,8 +365,16 @@ export const duplicateDeviceOld = (device: TrezorDevice): AsyncAction => async (
|
||||
export const duplicateDevice = (device: TrezorDevice): AsyncAction => async (
|
||||
dispatch: Dispatch
|
||||
): Promise<void> => {
|
||||
dispatch({
|
||||
type: CONNECT.REQUEST_WALLET_TYPE,
|
||||
device,
|
||||
});
|
||||
if (device.features && device.features.passphrase_always_on_device) {
|
||||
dispatch({
|
||||
type: CONNECT.RECEIVE_WALLET_TYPE,
|
||||
device,
|
||||
hidden: true,
|
||||
});
|
||||
} else {
|
||||
dispatch({
|
||||
type: CONNECT.REQUEST_WALLET_TYPE,
|
||||
device,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user