Skip to content

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Sep 9, 2025

Explanation

This PR migrates MultichainAccountService to the new @metamask/messenger message bus, as opposed to the one exported from @metamask/base-controller.

References

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 communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Replaces base-controller RestrictedMessenger with the new @metamask/messenger across service, tests, and types, adding delegation-based messaging and updating configs.

  • Messaging migration (BREAKING)
    • Replace @metamask/base-controller Messenger/RestrictedMessenger with @metamask/messenger.
    • Implement namespaced messenger via getRootMessenger() and delegated getMultichainAccountServiceMessenger() with explicit allowed actions/events.
    • Introduce type RootMessenger and update MultichainAccountServiceMessenger to use the new Messenger types.
  • Tests
    • Update all tests to use new messenger API (rootMessenger.publish/registerActionHandler, new types) and adjust constructor wiring.
  • Types
    • Update src/types.ts to use @metamask/messenger types; narrow AllowedActions/AllowedEvents to internal types and update messenger signature.
  • Package/Config
    • Add dependency @metamask/messenger and reference it in tsconfig project references.
    • Changelog: note BREAKING switch to @metamask/messenger.

Written by Cursor Bugbot for commit 52df0d8. This will update automatically on new commits. Configure here.

@cryptodev-2s cryptodev-2s self-assigned this Sep 9, 2025
@cryptodev-2s cryptodev-2s requested review from a team as code owners September 9, 2025 21:20
@cryptodev-2s cryptodev-2s mentioned this pull request Sep 9, 2025
43 tasks
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/multichain-account-service branch from 18f8701 to 2ea0719 Compare September 9, 2025 21:46
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/multichain-account-service branch from 2ea0719 to f22848c Compare September 9, 2025 22:31
mcmire
mcmire previously approved these changes Sep 10, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@cryptodev-2s cryptodev-2s requested a review from mcmire October 8, 2025 12:16
cursor[bot]

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants