From c6241643be36851ab6ce21b6b663d20c9c5c5983 Mon Sep 17 00:00:00 2001 From: Petr Friedrich Date: Fri, 1 Nov 2024 17:27:13 +0100 Subject: [PATCH] fix(suite): removing coin filter reset on wallet change --- .../suite/src/reducers/wallet/accountSearchReducer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/suite/src/reducers/wallet/accountSearchReducer.ts b/packages/suite/src/reducers/wallet/accountSearchReducer.ts index 7c9c9188509..deae3e3707e 100644 --- a/packages/suite/src/reducers/wallet/accountSearchReducer.ts +++ b/packages/suite/src/reducers/wallet/accountSearchReducer.ts @@ -2,8 +2,8 @@ import produce from 'immer'; import { deviceActions } from '@suite-common/wallet-core'; -import { ACCOUNT_SEARCH } from 'src/actions/wallet/constants'; import * as walletSettingsActions from 'src/actions/settings/walletSettingsActions'; +import { ACCOUNT_SEARCH } from 'src/actions/wallet/constants'; import { Action } from 'src/types/suite'; import { Account as AccountType } from 'src/types/wallet'; @@ -28,8 +28,7 @@ const accountSearchReducer = (state: State = initialState, action: Action): Stat break; // reset coin filter on: // 1) disabling/enabling coins - // 2) switching to another device/wallet - // * 3) adding a new account is handled directly in add account modal, reacting on ACCOUNT.CREATE would cause resetting during initial accounts discovery + // 2) adding a new account is handled directly in add account modal, reacting on ACCOUNT.CREATE would cause resetting during initial accounts discovery case walletSettingsActions.changeNetworks.type: { if (walletSettingsActions.changeNetworks.match(action)) { draft.coinFilter = undefined; @@ -37,8 +36,9 @@ const accountSearchReducer = (state: State = initialState, action: Action): Stat } break; } + + // reset coin filter search case deviceActions.selectDevice.type: - draft.coinFilter = undefined; draft.searchString = undefined; break;