Conversation
…ask/core into gar/fix/snap-account-event-publish
ccharly
previously approved these changes
Sep 4, 2026
ccharly
left a comment
Contributor
There was a problem hiding this comment.
LGTM, left 2 very small nits, nothing too important
ccharly
reviewed
Sep 4, 2026
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
gantunesr
marked this pull request as ready for review
September 10, 2026 15:59
gantunesr
temporarily deployed
to
default-branch
September 10, 2026 15:59 — with
GitHub Actions
Inactive
Contributor
|
@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. |
Contributor
|
@metamaskbot publish-preview |
1 similar comment
Contributor
|
@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. |
4 tasks
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
References
Fixes https://consensyssoftware.atlassian.net/browse/MUL-2196
Checklist
Note
High Risk
Changes the Snap sandbox boundary for account balance, transaction, and asset notifications; incorrect ownership filtering or stale cache could hide legitimate updates or allow forged data until fixed.
Overview
SnapAccountService no longer republishes balance, transaction, and asset-list notifications verbatim from a Snap. It keeps a lazy account → owning Snap map from
AccountsController(initialgetState, thenaccountsAdded/accountsRemoved) and strips entries for accounts the sender does not own before emittingSnapAccountService:*Updatedevents. Updates with no owned accounts are dropped (fail closed).This closes a trust gap where one Snap could report data for another Snap’s accounts or arbitrary IDs. The hot path stays synchronous (map lookup only, no keyring round-trip). Integrators must wire the new
AccountsControllermessenger action and events and take the documented breaking dependency on@metamask/accounts-controller.Reviewed by Cursor Bugbot for commit 5c79689. Bugbot is set up for automated code reviews on this repo. Configure here.