Skip to content

chore!: bump accounts deps#8584

Open
ccharly wants to merge 9 commits intomainfrom
cc/chore/bump-accounts-deps
Open

chore!: bump accounts deps#8584
ccharly wants to merge 9 commits intomainfrom
cc/chore/bump-accounts-deps

Conversation

@ccharly
Copy link
Copy Markdown
Contributor

@ccharly ccharly commented Apr 27, 2026

Explanation

Bumping accounts deps and re-adapt usage of InternalAccount.metadata.snap.{enabled,name}.

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

Medium Risk
Introduces a breaking change to Snap account metadata and changes how Snap accounts are grouped/enabled by delegating to SnapController:getSnap, which can affect wallet categorization and downstream consumers relying on the old fields/events.

Overview
Snap account classification now consults SnapController rather than InternalAccount.metadata.snap.enabled. SnapRule calls SnapController:getSnap to confirm a Snap exists and is enabled; Snap accounts referencing missing Snaps are no longer treated as Snap wallets and fall back to keyring-based grouping, with tests updated accordingly.

Accounts-related packages are updated for the new Snap metadata shape. The AccountsController drops its SnapController:stateChange subscription and the logic/tests that mutated metadata.snap.enabled, and multiple packages bump @metamask/keyring-internal-api to ^11.0.0 (plus @metamask/eth-snap-keyring to ^22.0.0 where used); changelogs document the breaking removal of InternalAccount.metadata.snap.{enabled,name}.

Reviewed by Cursor Bugbot for commit c47a59d. Bugbot is set up for automated code reviews on this repo. Configure here.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 27, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​eth-snap-keyring@​21.0.1 ⏵ 22.0.09810091 -195 -150
Updated@​metamask/​keyring-internal-api@​10.1.1 ⏵ 11.0.01001007397100

View full report

@ccharly ccharly marked this pull request as ready for review April 27, 2026 09:01
@ccharly ccharly requested review from a team as code owners April 27, 2026 09:01
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c47a59d. Configure here.

return (
account.metadata.keyring.type === (KeyringTypes.snap as string) &&
snap.enabled
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing blocked check in new #isSnapAccount method

Medium Severity

The new #isSnapAccount only checks snap.enabled but omits the !snap.blocked check. The old code in AccountsController.#handleOnSnapStateChange computed enabled as snap.enabled && !snap.blocked before storing it in account.metadata.snap.enabled, which was then checked by the old isSnapAccount. The refactored version lost the blocked guard, so a snap that is enabled but blocked will now be treated as a valid snap account instead of falling back to the keyring rule.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c47a59d. Configure here.

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.

1 participant