1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-28 03:08:30 +00:00

remove data while switchin between wallet types

This commit is contained in:
Szymon Lesisz 2018-10-08 11:59:10 +02:00
parent 14eac38246
commit 0a77d0541e
4 changed files with 8 additions and 0 deletions

View File

@ -92,6 +92,8 @@ export default (state: State = initialState, action: Action): State => {
case CONNECT.FORGET: case CONNECT.FORGET:
case CONNECT.FORGET_SINGLE: case CONNECT.FORGET_SINGLE:
case CONNECT.FORGET_SILENT:
case CONNECT.RECEIVE_WALLET_TYPE:
return removeAccounts(state, action.device); return removeAccounts(state, action.device);
case WALLET.CLEAR_UNAVAILABLE_DEVICE_DATA: case WALLET.CLEAR_UNAVAILABLE_DEVICE_DATA:

View File

@ -185,6 +185,8 @@ export default function discovery(state: State = initialState, action: Action):
}); });
case CONNECT.FORGET: case CONNECT.FORGET:
case CONNECT.FORGET_SINGLE: case CONNECT.FORGET_SINGLE:
case CONNECT.FORGET_SILENT:
case CONNECT.RECEIVE_WALLET_TYPE:
return forgetDiscovery(state, action.device); return forgetDiscovery(state, action.device);
case WALLET.CLEAR_UNAVAILABLE_DEVICE_DATA: case WALLET.CLEAR_UNAVAILABLE_DEVICE_DATA:
return clear(state, action.devices); return clear(state, action.devices);

View File

@ -71,6 +71,8 @@ export default (state: State = initialState, action: Action): State => {
case CONNECT.FORGET: case CONNECT.FORGET:
case CONNECT.FORGET_SINGLE: case CONNECT.FORGET_SINGLE:
case CONNECT.FORGET_SILENT:
case CONNECT.RECEIVE_WALLET_TYPE:
return forget(state, action.device); return forget(state, action.device);
case WALLET.CLEAR_UNAVAILABLE_DEVICE_DATA: case WALLET.CLEAR_UNAVAILABLE_DEVICE_DATA:

View File

@ -102,6 +102,8 @@ const LocalStorageService: Middleware = (api: MiddlewareAPI) => (next: Middlewar
case CONNECT.FORGET: case CONNECT.FORGET:
case CONNECT.FORGET_SINGLE: case CONNECT.FORGET_SINGLE:
case CONNECT.FORGET_SILENT:
case CONNECT.RECEIVE_WALLET_TYPE:
case DEVICE.CHANGED: case DEVICE.CHANGED:
case DEVICE.DISCONNECT: case DEVICE.DISCONNECT:
case CONNECT.AUTH_DEVICE: case CONNECT.AUTH_DEVICE: