feat(accounts-controller)!: use new SnapAccountService account data events#8978
Merged
Conversation
…dleKeyringSnapMessage
…ap-account-service-forward-non-keyring-events
…ts own PR)" This reverts commit b08e13e.
ccharly
commented
Jun 3, 2026
Comment on lines
+17
to
+30
| export type SnapAccountServiceAccountBalancesUpdatedEvent = { | ||
| type: `SnapAccountService:accountBalancesUpdated`; | ||
| payload: SnapKeyringAccountBalancesUpdatedEvent['payload']; | ||
| }; | ||
|
|
||
| export type SnapAccountServiceAccountTransactionsUpdatedEvent = { | ||
| type: `SnapAccountService:accountTransactionsUpdated`; | ||
| payload: SnapKeyringAccountTransactionsUpdatedEvent['payload']; | ||
| }; | ||
|
|
||
| export type SnapAccountServiceAccountAssetListUpdatedEvent = { | ||
| type: `SnapAccountService:accountAssetListUpdated`; | ||
| payload: SnapKeyringAccountAssetListUpdatedEvent['payload']; | ||
| }; |
Contributor
Author
There was a problem hiding this comment.
We put them here to avoid having a cycle:
snap-account-service -> account-tree-controller -> accounts-controller
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
We used to get those events from the
SnapKeyringbut now it all comes from theSnapAccountService!References
:handleKeyringSnapMessage#8916Checklist
Note
Medium Risk
Breaking messenger event wiring can break balance/asset/transaction UI updates for snap accounts if consumers are not updated alongside this package.
Overview
Breaking:
AccountsControllernow listens for snap account data onSnapAccountServiceinstead ofSnapKeyring.Subscriptions and allowed incoming events switch from
SnapKeyring:account{AssetList,Balances,Transactions}UpdatedtoSnapAccountService:account{AssetList,Balances,Transactions}Updated. Payload shapes are unchanged (reused via new types intypes.ts). The controller still re-publishes the sameAccountsController:account*events.Integrators must register the three
SnapAccountServiceevents on the messenger and stop requiring theSnapKeyringvariants. Tests and the changelog document the breaking messenger contract.Reviewed by Cursor Bugbot for commit 4bcc1c6. Bugbot is set up for automated code reviews on this repo. Configure here.