Skip to content

Commit

Permalink
Thisyahlen/fix: account switching (#17831)
Browse files Browse the repository at this point in the history
* fix: account switching

* chore: empty commit

---------

Co-authored-by: Thisyahlen <[email protected]>
  • Loading branch information
thisyahlen-deriv and Thisyahlen authored Dec 17, 2024
1 parent 480b55c commit 01c0d41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/src/Stores/client-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 01c0d41

Please sign in to comment.