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

Emit accountsChanged after updating accounts state #72

Merged
merged 2 commits into from
Jul 21, 2020

Conversation

rekmarks
Copy link
Member

@rekmarks rekmarks commented Jul 20, 2020

Ref: MetaMask/metamask-extension#9027

We were emitting accountsChanged before all accounts-related state was updated. While it only affected deprecated state, we should still fix it.

This PR ensures that accountsChanged is only emitted after all related state has been updated. In addition, it does some minor cleanup of the _handleAccountsChanged function.

@rekmarks rekmarks requested a review from a team as a code owner July 20, 2020 15:29
Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rekmarks rekmarks merged commit e76754a into master Jul 21, 2020
@rekmarks rekmarks deleted the accounts-changed-emit-order branch July 21, 2020 14:44
rekmarks added a commit that referenced this pull request Jul 21, 2020
@rekmarks rekmarks mentioned this pull request Jul 21, 2020
rekmarks added a commit that referenced this pull request Jul 21, 2020
* 6.1.0

* #72, #73, #76, #78
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.

3 participants