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

feat(accounts-controller): re-publish Snap keyring events #5190

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ccharly
Copy link
Contributor

@ccharly ccharly commented Jan 23, 2025

Explanation

The SnapKeyring now forward some keyring events coming from a Snap. To avoid having controllers to depend the SnapKeyring for those new events, we subscribe to them from the AccountsController and re-publish them from it. This way, the AccountsController is the sole dependency for those events (and is already a dependency of many controllers anyway).

References

Changelog

@metamask/accounts-controller

  • ADDED: Re-publish Snap keyring events

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@ccharly
Copy link
Contributor Author

ccharly commented Jan 23, 2025

@metamaskbot publish-preview

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "21.0.2-preview-b1518d1",
  "@metamask-previews/address-book-controller": "6.0.2-preview-b1518d1",
  "@metamask-previews/announcement-controller": "7.0.2-preview-b1518d1",
  "@metamask-previews/approval-controller": "7.1.2-preview-b1518d1",
  "@metamask-previews/assets-controllers": "46.0.1-preview-b1518d1",
  "@metamask-previews/base-controller": "7.1.1-preview-b1518d1",
  "@metamask-previews/build-utils": "3.0.2-preview-b1518d1",
  "@metamask-previews/composable-controller": "10.0.0-preview-b1518d1",
  "@metamask-previews/controller-utils": "11.4.5-preview-b1518d1",
  "@metamask-previews/ens-controller": "15.0.1-preview-b1518d1",
  "@metamask-previews/eth-json-rpc-provider": "4.1.7-preview-b1518d1",
  "@metamask-previews/gas-fee-controller": "22.0.2-preview-b1518d1",
  "@metamask-previews/json-rpc-engine": "10.0.2-preview-b1518d1",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.6-preview-b1518d1",
  "@metamask-previews/keyring-controller": "19.0.4-preview-b1518d1",
  "@metamask-previews/logging-controller": "6.0.3-preview-b1518d1",
  "@metamask-previews/message-manager": "12.0.0-preview-b1518d1",
  "@metamask-previews/multichain": "2.1.0-preview-b1518d1",
  "@metamask-previews/multichain-transactions-controller": "0.0.1-preview-b1518d1",
  "@metamask-previews/name-controller": "8.0.2-preview-b1518d1",
  "@metamask-previews/network-controller": "22.1.1-preview-b1518d1",
  "@metamask-previews/notification-services-controller": "0.16.0-preview-b1518d1",
  "@metamask-previews/permission-controller": "11.0.5-preview-b1518d1",
  "@metamask-previews/permission-log-controller": "3.0.2-preview-b1518d1",
  "@metamask-previews/phishing-controller": "12.3.1-preview-b1518d1",
  "@metamask-previews/polling-controller": "12.0.2-preview-b1518d1",
  "@metamask-previews/preferences-controller": "15.0.1-preview-b1518d1",
  "@metamask-previews/profile-sync-controller": "4.1.1-preview-b1518d1",
  "@metamask-previews/queued-request-controller": "9.0.0-preview-b1518d1",
  "@metamask-previews/rate-limit-controller": "6.0.2-preview-b1518d1",
  "@metamask-previews/remote-feature-flag-controller": "1.3.0-preview-b1518d1",
  "@metamask-previews/selected-network-controller": "21.0.0-preview-b1518d1",
  "@metamask-previews/signature-controller": "23.2.0-preview-b1518d1",
  "@metamask-previews/token-search-discovery-controller": "1.0.0-preview-b1518d1",
  "@metamask-previews/transaction-controller": "43.0.0-preview-b1518d1",
  "@metamask-previews/user-operation-controller": "22.0.0-preview-b1518d1"
}

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