Conversation
…adata.enabled support
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 | ||
| ); |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit c47a59d. Configure here.


Explanation
Bumping
accountsdeps and re-adapt usage ofInternalAccount.metadata.snap.{enabled,name}.References
N/A
Checklist
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
SnapControllerrather thanInternalAccount.metadata.snap.enabled.SnapRulecallsSnapController:getSnapto 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
AccountsControllerdrops itsSnapController:stateChangesubscription and the logic/tests that mutatedmetadata.snap.enabled, and multiple packages bump@metamask/keyring-internal-apito^11.0.0(plus@metamask/eth-snap-keyringto^22.0.0where used); changelogs document the breaking removal ofInternalAccount.metadata.snap.{enabled,name}.Reviewed by Cursor Bugbot for commit c47a59d. Bugbot is set up for automated code reviews on this repo. Configure here.