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: handle undefined selectedAccount in updateAccounts #4623

Merged

Conversation

montelaidev
Copy link
Contributor

Explanation

This PR fixes updateAccounts in the AccountsController to handle the edge case where the selected account is undefined. This follows the same logic used in onKeyringStateChange

References

Fixes: MetaMask/metamask-extension#26377

Changelog

@metamask/accounts-controller

  • FIXED: updateAccounts logic to handle when the selectedAccount is undefined.

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

@montelaidev montelaidev marked this pull request as ready for review August 20, 2024 15:03
@montelaidev montelaidev requested a review from a team as a code owner August 20, 2024 15:03
@montelaidev montelaidev merged commit f0e4502 into main Aug 20, 2024
116 checks passed
@montelaidev montelaidev deleted the fix/update-accounts-handing-undefined-selected-account branch August 20, 2024 15:49
@montelaidev montelaidev mentioned this pull request Aug 21, 2024
3 tasks
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.

Error: Account Id [UUID] not found
2 participants