Skip to content

fix detect tokens on account switch #4957

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
Nov 22, 2024

Conversation

salimtb
Copy link
Contributor

@salimtb salimtb commented Nov 21, 2024

Explanation

Currently, the TokenDetectionController detects tokens only for the active network when switching accounts. This behavior does not account for the added networks in the NetworkController. Consequently, token detection is limited and does not cover all networks where the user might have assets.

References

Changelog

@metamask/assets-controllers

  • ADDED: Token detection now supports all added networks when switching accounts.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@salimtb salimtb force-pushed the salim/fix-detect-tokens-on-account-switch branch from 6301f24 to 21f8360 Compare November 21, 2024 15:14
@salimtb salimtb changed the title Salim/fix detect tokens on account switch fix detect tokens on account switch Nov 22, 2024
@salimtb salimtb marked this pull request as ready for review November 22, 2024 10:13
@salimtb salimtb requested a review from a team as a code owner November 22, 2024 10:13
@salimtb salimtb requested a review from sahar-fehri November 22, 2024 11:27
@salimtb salimtb merged commit 1e23e90 into main Nov 22, 2024
121 checks passed
@salimtb salimtb deleted the salim/fix-detect-tokens-on-account-switch branch November 22, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants