Skip to content

feat(snap-account-service): add getLegacySnapKeyring#8757

Open
ccharly wants to merge 7 commits into
mainfrom
cc/feat/snap-account-service-legacy-snap-keyring
Open

feat(snap-account-service): add getLegacySnapKeyring#8757
ccharly wants to merge 7 commits into
mainfrom
cc/feat/snap-account-service-legacy-snap-keyring

Conversation

@ccharly
Copy link
Copy Markdown
Contributor

@ccharly ccharly commented May 11, 2026

Explanation

Add a getLegacySnapKeyring to replace all use of getSnapKeyring in each clients.

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
Adds a new messenger-exposed method that can create a legacy Snap keyring via KeyringController:withController, which touches keyring management and could impact account/keyring state if misused. Scope is otherwise contained to the snap-account-service package with dedicated tests.

Overview
Adds a new SnapAccountService:getLegacySnapKeyring messenger action that atomically returns the existing legacy Snap keyring (KeyringTypes.snap) or creates it via KeyringController:withController/addNewKeyring, with logging when creation occurs.

Updates action type unions and tests to cover existing-keyring, create-if-missing, and error propagation behavior, and adds @metamask/eth-snap-keyring (plus @metamask/keyring-utils for typing) dependencies alongside changelog entries.

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

@ccharly ccharly requested review from a team as code owners May 11, 2026 09:18
@ccharly ccharly changed the title feat(snap-account-service): add getLegacySnapKeyring feat(snap-account-service): add getLegacySnapKeyring May 11, 2026
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 f222f71. Configure here.

@ccharly ccharly enabled auto-merge May 11, 2026 10:46
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