Skip to content

Commit

Permalink
fix(suite): removing coin filter reset on wallet change
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloBanksy authored and tomasklim committed Nov 23, 2024
1 parent 480e152 commit c624164
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/suite/src/reducers/wallet/accountSearchReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -28,17 +28,17 @@ 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;
draft.searchString = undefined;
}
break;
}

// reset coin filter search
case deviceActions.selectDevice.type:
draft.coinFilter = undefined;
draft.searchString = undefined;
break;

Expand Down

0 comments on commit c624164

Please sign in to comment.