Skip to content
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

fix: token detection during account change #4132

Closed
wants to merge 0 commits into from

Conversation

bergeron
Copy link
Contributor

@bergeron bergeron commented Apr 3, 2024

Explanation

During account change, the token detection trigger was guarded by the useTokenDetection setting. But on mainnet, detection should run against the static token list even if the setting is disabled. So remove the guard.

I also removed the account change logic from PreferencesController:stateChange. It seemed redundant because AccountsController:selectedAccountChange already handles it fine in my testing.

References

MetaMask/metamask-extension#23798

Changelog

@metamask/assets-controllers

  • FIXED: Token detection during account change

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

@bergeron bergeron requested a review from a team as a code owner April 3, 2024 06:06
@bergeron bergeron closed this Apr 3, 2024
@bergeron bergeron force-pushed the brian/token-detect-on-mainnet-when-setting-off branch from 3f9fc84 to 4f6df1d Compare April 3, 2024 06:28
@bergeron
Copy link
Contributor Author

bergeron commented Apr 3, 2024

Closed in favor of #4133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant