mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-30 20:28:09 +00:00
close modal on DEVICE.CONNECT action
This commit is contained in:
parent
337eacd1d2
commit
5eb5e3f774
@ -52,6 +52,15 @@ export default function modal(state: State = initialState, action: Action): Stat
|
||||
}
|
||||
return state;
|
||||
|
||||
// device connected
|
||||
// close modal if modal context is not 'device'
|
||||
case DEVICE.CONNECT:
|
||||
case DEVICE.CONNECT_UNACQUIRED:
|
||||
if (state.context !== MODAL.CONTEXT_DEVICE) {
|
||||
return initialState;
|
||||
}
|
||||
return state;
|
||||
|
||||
// device with context assigned to modal was disconnected
|
||||
// close modal
|
||||
case DEVICE.DISCONNECT:
|
||||
|
Loading…
Reference in New Issue
Block a user