Skip to content

fix(keyring-snap-bridge): set Snap ID during deserialize#519

Draft
ccharly wants to merge 1 commit intomainfrom
cc/fix/snap-keyring-v2
Draft

fix(keyring-snap-bridge): set Snap ID during deserialize#519
ccharly wants to merge 1 commit intomainfrom
cc/fix/snap-keyring-v2

Conversation

@ccharly
Copy link
Copy Markdown
Contributor

@ccharly ccharly commented Apr 17, 2026

Using the snapId in the constructor was working fine in the current setup, unfortunately this cannot be used with our keyring lifecycle.

The way the KeyringController creates keyring is:

  • Creates the keyring with its builder new Keyring(...)
    • We cannot really pass dynamic options here
    • The Snap keyring v2 will be instantiated BY the KeyringController that have no knowledge about Snap IDs
  • Call deserialize with some custom data
    • That's what we need to use to inject the Snap ID we need

Some thing like:

await controller.addNewKeyring(KeyringType.Snap /* v2 */, { snapId, accounts: { ... } });

@ccharly ccharly changed the title fix(keyring-snap-bridge): set Snap ID during deserialize fix(keyring-snap-bridge): set Snap ID during deserialize Apr 17, 2026
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