mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-23 16:58:28 +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 (!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…
Reference in New Issue
Block a user