feat(keyring-snap-bridge): add SnapKeyringV1Adapter#557
Merged
Conversation
eac88e2 to
9bf5386
Compare
Contributor
Author
|
@metamaskbot publish-preview |
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 bc99865. Configure here.
|
Preview builds have been published. See these instructions (from the Expand for full list of packages and versions. |
a20d5ae to
d5bbec6
Compare
hmalik88
approved these changes
May 28, 2026
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.

A more specialized adapter for the
SnapKeyringv2 instances. For recall, each v2 instances are being wrapped in a v1 equivalent adapter since theKeyringControllerrequires it.We now have a more specific one mostly to address a different implementation of
removeAccount(it always had beenasynceven in the legacy Snap keyring) AND theKeyringControlleralreadyawaitfor this call.Note
Low Risk
Small, focused adapter with tests; account removal behavior is intentional compatibility with KeyringController, not new crypto or auth logic.
Overview
Introduces
SnapKeyringV1Adapter, a thin wrapper around v2SnapKeyringso it can be used whereKeyringControllerstill expects the legacy v1 keyring surface.Most v1 behavior (including EVM signing) comes from
EthKeyringV1Adapterin@metamask/keyring-sdk. This PR adds Snap-specificremoveAccount(address): resolve the account by address, thendeleteAccountby id—matching the legacy Snap keyring’s async removal flow that the controller already awaits.The adapter is exported from
@metamask/keyring-snap-bridge/v2, documented in the package changelog, and covered by unit tests for generic v1 adapter behavior and account removal errors.Reviewed by Cursor Bugbot for commit 7c29631. Bugbot is set up for automated code reviews on this repo. Configure here.