Skip to content

fix: clear tokens from other networks #660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/sagas/networkSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,13 @@ export function* persistNetworkSettings(action) {

// Stop wallet and clean its storage without clean its access data.
wallet.stop({ cleanStorage: true, cleanAddresses: true, cleanTokens: true });

// Clean transaction history, addresses and registered tokens from local storage as well
const storage = STORE.getStorage();
yield call([storage, storage.cleanStorage], true, true, true);

// This action should clean the tokens history on redux.
// In addition, the reload also clean the inmemory storage.
// In addition, the reload also clean the in memory storage.
yield put(reloadWalletRequested());
}

Expand Down