1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-25 16:38:08 +00:00

quickfix: disable REQUEST_WALLET_TYPE action for device without passphrase_protection

This commit is contained in:
Szymon Lesisz 2018-10-09 14:39:10 +02:00
parent 6a3e71f0a5
commit 0f39182db7

View File

@ -167,10 +167,19 @@ export const requestWalletType = (): AsyncAction => async (dispatch: Dispatch, g
const isDeviceReady = selected.connected && selected.features && !selected.state && selected.mode === 'normal' && selected.firmware !== 'required';
if (!isDeviceReady) return;
dispatch({
type: CONNECT.REQUEST_WALLET_TYPE,
device: selected,
});
if (selected.features && selected.features.passphrase_protection) {
dispatch({
type: CONNECT.REQUEST_WALLET_TYPE,
device: selected,
});
} else {
dispatch({
type: CONNECT.RECEIVE_WALLET_TYPE,
device: selected,
hidden: false,
state: selected.state,
});
}
};
export const authorizeDevice = (): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {