mirror of
https://github.com/trezor/trezor-wallet
synced 2025-06-17 21:48:48 +00:00
Update RouterActions.js
This commit is contained in:
parent
6cfff6d598
commit
13b49c32b5
@ -429,19 +429,13 @@ export const setInitialUrl = (): PayloadAction<boolean> => (
|
|||||||
dispatch: Dispatch,
|
dispatch: Dispatch,
|
||||||
getState: GetState
|
getState: GetState
|
||||||
): boolean => {
|
): boolean => {
|
||||||
const { initialPathname } = getState().wallet;
|
|
||||||
if (typeof initialPathname !== 'string') return false;
|
|
||||||
|
|
||||||
// DEVICE.CONNECT race condition, "selectDevice" method was called but currently selectedDevice is in getState (auth) process
|
// DEVICE.CONNECT race condition, "selectDevice" method was called but currently selectedDevice is in getState (auth) process
|
||||||
// if so, consume this action (return true) to break "selectDevice" process
|
// if so, consume this action (return true) to break "selectDevice" process
|
||||||
const { selectedDevice } = getState().wallet;
|
const { selectedDevice } = getState().wallet;
|
||||||
if (
|
if (selectedDevice && selectedDevice.type === 'acquired' && !selectedDevice.state) return true;
|
||||||
selectedDevice &&
|
|
||||||
selectedDevice.type === 'acquired' &&
|
const { initialPathname } = getState().wallet;
|
||||||
!selectedDevice.features.passphrase_protection &&
|
if (typeof initialPathname !== 'string') return false;
|
||||||
!selectedDevice.state
|
|
||||||
)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
const valid = dispatch(
|
const valid = dispatch(
|
||||||
getValidUrl({
|
getValidUrl({
|
||||||
|
Loading…
Reference in New Issue
Block a user