Skip to content

refactor: migrate {NotificationServices,NotificationServicesPush}Controller to @metamask/messenger - #6538

Merged
FrederikBolding merged 5 commits into
mainfrom
cryptodev-2s/messenger/notification-services-controller
Oct 27, 2025
Merged

refactor: migrate {NotificationServices,NotificationServicesPush}Controller to @metamask/messenger#6538
FrederikBolding merged 5 commits into
mainfrom
cryptodev-2s/messenger/notification-services-controller

Conversation

@cryptodev-2s

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

Copy link
Copy Markdown
Contributor

Explanation

This PR migrates NotificationServicesController and NotificationServicesPushController 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

Migrates Notification Services controllers to the new @metamask/messenger, updates metadata flag, and adjusts tests/configs accordingly.

  • Notification Services:
    • Migrate NotificationServicesController and NotificationServicesPushController from RestrictedMessenger (@metamask/base-controller) to Messenger (@metamask/messenger), updating all call/subscribe/publish/registerActionHandler usages.
    • Switch imports to @metamask/base-controller/next for BaseController and deriveStateFromMetadata.
    • Rename state metadata flag from anonymous to includeInDebugSnapshot in code and tests.
    • Remove package-level exports of AllowedActions/AllowedEvents; keep as internal types.
    • Update tests and mock messengers to use namespaced root messenger and delegation.
  • Dependencies/Config/Docs:
    • Add dependency on @metamask/messenger@^0.3.0; add TS project references to packages/messenger.
    • Update README dependency graph to show notification_services_controller --> messenger and add eip_7702_internal_rpc_middleware --> controller_utils.
    • Update CHANGELOG with breaking changes.

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

@cryptodev-2s
cryptodev-2s requested review from a team as code ownersSeptember 9, 2025 17:02
@cryptodev-2scryptodev-2s self-assigned this Sep 9, 2025
@cryptodev-2s
cryptodev-2sforce-pushed the cryptodev-2s/messenger/notification-services-controller branch 2 times, most recently from 851b86f to e948005CompareSeptember 9, 2025 17:06
@cryptodev-2scryptodev-2s mentioned this pull request Sep 9, 2025
43 tasks
@cryptodev-2s
cryptodev-2sforce-pushed the cryptodev-2s/messenger/notification-services-controller branch 3 times, most recently from 5bf8c54 to 873453dCompareOctober 7, 2025 11:27
@cryptodev-2scryptodev-2s changed the title refactor: migrate {NotificationServices,NotificationServicesPush}Controller to `@metamask/messengerrefactor: migrate {NotificationServices,NotificationServicesPush}Controller to @metamask/messengerOct 7, 2025
@cryptodev-2s
cryptodev-2sforce-pushed the cryptodev-2s/messenger/notification-services-controller branch from 873453d to 1df4622CompareOctober 7, 2025 11:38
mcmire
mcmire previously approved these changes Oct 7, 2025

@mcmiremcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@FrederikBolding
FrederikBolding added this pull request to the merge queueOct 27, 2025
Merged via the queue into main with commit 2f086aaOct 27, 2025
256 of 257 checks passed
@FrederikBolding
FrederikBolding deleted the cryptodev-2s/messenger/notification-services-controller branch October 27, 2025 12:46
Sign up for freeto 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.

5 participants

@cryptodev-2s@mcmire@Mrtenz@FrederikBolding@mikesposito