From 01c0d412dc5dca0c957023f63991c68a620691fe Mon Sep 17 00:00:00 2001 From: thisyahlen <104053934+thisyahlen-deriv@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:10:30 +0800 Subject: [PATCH] Thisyahlen/fix: account switching (#17831) * fix: account switching * chore: empty commit --------- Co-authored-by: Thisyahlen --- packages/core/src/Stores/client-store.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/core/src/Stores/client-store.js b/packages/core/src/Stores/client-store.js index 48099b4a5590..f41e81726aff 100644 --- a/packages/core/src/Stores/client-store.js +++ b/packages/core/src/Stores/client-store.js @@ -1677,6 +1677,12 @@ export default class ClientStore extends BaseStore { await this.fetchStatesList(); } if (!this.is_virtual) await this.getLimits(); + + // This was set for the new callback page logic, once the user has logged in, we can remove the tokens and account1 from local storage since client.accounts is handling it already + if (localStorage.getItem('config.tokens') && localStorage.getItem('config.account1')) { + localStorage.removeItem('config.tokens'); + localStorage.removeItem('config.account1'); + } } else { this.resetMt5AccountListPopulation(); }