You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(keyring-controller): do not fire unnecessary :stageChange in withKeyring (#5732)
## Explanation
We were always calling `#updateVault` when using `withKeyring` even when
the keyring was not mutated.
This PR now compare the states after the operation execution and see if
the keyring got updated or not and decide to call `#updateVault` only if
needed.
Testing PR:
- MetaMask/metamask-extension#32414
## References
N/A
## Changelog
N/A
## Checklist
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
---------
Co-authored-by: Michele Esposito <[email protected]>
0 commit comments