Skip to content

Consolidate keyring interactions on extension and mobile #1101

@Gudahtt

Description

@Gudahtt

Today both extension and mobile use the eth-keyring-controller package, but they each have their own wrapper methods for safely interacting with this underlying keyring controller. These wrapper functions handle things like:

  • Keeping other controller state in-sync with keyring state
  • Input parsing
  • Setup and cleanup steps for hardware wallets
  • Routing messages between the keyring controller and the message signing controllers

Mobile has these wrapper functions in @metamask/keyring-controller, but extension has them as part of metamask-extension.js. Most of the functionality is similar between the two, but there are many differences as well.

We should consolidate this code between extension and mobile where possible, so that both projects are using @metamask/keyring-controller. We can normalize the behavior between them both where possible. In cases where we do need some project-specific code, we can migrate that into the client repositories directly.

Sub-issues

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions