Skip to content

perf(accounts-controller): add batch events#8151

Merged
ccharly merged 1 commit intomainfrom
cc/feat/accounts-added-event
Mar 10, 2026
Merged

perf(accounts-controller): add batch events#8151
ccharly merged 1 commit intomainfrom
cc/feat/accounts-added-event

Conversation

@ccharly
Copy link
Contributor

@ccharly ccharly commented Mar 9, 2026

Explanation

Add new batched events in the AccountsController to allow consumers to use multiple accounts at once when multiple accounts get updated at once in a withKeyring call (which will follow-up with a KeyringController:stateChange event).

References

N/A

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 communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Additive event emission change: existing per-account events remain, and new batch events are only published when there are additions/removals, making impact to consumers opt-in and low risk.

Overview
Adds new batch messenger events AccountsController:accountsAdded and AccountsController:accountsRemoved (and exported event types) that emit arrays of accounts/IDs during KeyringController:stateChange synchronization.

Updates sync logic to publish these batch events after the existing per-account :accountAdded/:accountRemoved events (only when non-empty), and extends the test suite and changelog to cover payloads and ordering guarantees.

Written by Cursor Bugbot for commit 032c44c. This will update automatically on new commits. Configure here.

@ccharly ccharly force-pushed the cc/feat/accounts-added-event branch from d909c62 to 032c44c Compare March 10, 2026 09:22
@ccharly ccharly marked this pull request as ready for review March 10, 2026 09:22
@ccharly ccharly requested review from a team as code owners March 10, 2026 09:23
Copy link
Contributor

@mathieuartu mathieuartu left a comment

Choose a reason for hiding this comment

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

Looks good!

@ccharly ccharly added this pull request to the merge queue Mar 10, 2026
Merged via the queue into main with commit 8cbe1c1 Mar 10, 2026
322 checks passed
@ccharly ccharly deleted the cc/feat/accounts-added-event branch March 10, 2026 10:14
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