Skip to content

KeyringController addNewKeyring should not return the keyring instance #5371

Closed

Description

@mikesposito

The addNewKeyring method from KeyringController returns the keyring instance that was just created. However, this practice creates a loophole in controller safeguards, because the client will be incentivized to use the keyring instance directly instead of using KeyringController's dedicated API.

addNewKeyring should return the newly created keyring metadata, instead of the instance. The client can then use the ID with withKeyring to interact with the keyring instance safely.

Metadata

Metadata

Assignees

Labels

team-wallet-frameworkDeprecated: Please use `team-core-platform` instead.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions