Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[keyring-controller] Mitigate run conditions with >^16.x #24276

Open
mikesposito opened this issue Apr 29, 2024 · 0 comments
Open

[keyring-controller] Mitigate run conditions with >^16.x #24276

mikesposito opened this issue Apr 29, 2024 · 0 comments
Labels
INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. team-shared-libraries

Comments

@mikesposito
Copy link
Member

mikesposito commented Apr 29, 2024

After merging these changes (Likely released in @metamask/keyring-controller version 16.0.0 at the time of writing):

@metamask/keyring-controller should be updated to a minimum version of (at the time of writing) ^16.0.0 to bring the changes to the client.

Update guide

The version 16.0.0 (presumably) brings many improvements, especially in terms of run conditions mitigation. There are two main breaking changes between 15.x and 16.x:

  • KeyringController's methods don't return the entire controller state anymore: in case that's still needed, clients can use the controller.state getter
  • persistAllKeyrings (and relative :persistAllKeyrings action) has been deprecated, and an alternative for methods that were deprecated in previous versions has been provided now: the withKeyring method
    • Clients (and other controllers) can leverage the withKeyring method to drop usage of getKeyringsByType, getKeyringForAccount, and persistAllKeyrings, by passing a keyring selector and a callback that will be executed as a mutually exclusive controller operation
@metamaskbot metamaskbot added the INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. label Apr 29, 2024
@mikesposito mikesposito changed the title [keyring-controller] Mitigate run conditions using >^16.x [keyring-controller] Mitigate run conditions with >^16.x Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. team-shared-libraries
Projects
None yet
Development

No branches or pull requests

2 participants