Skip to content

Conversation

@cryptodev-2s
Copy link
Contributor

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

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 owners September 9, 2025 17:02
@cryptodev-2s cryptodev-2s self-assigned this Sep 9, 2025
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/notification-services-controller branch 2 times, most recently from 851b86f to e948005 Compare September 9, 2025 17:06
@cryptodev-2s cryptodev-2s mentioned this pull request Sep 9, 2025
43 tasks
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/notification-services-controller branch 3 times, most recently from 5bf8c54 to 873453d Compare October 7, 2025 11:27
@cryptodev-2s cryptodev-2s changed the title refactor: migrate {NotificationServices,NotificationServicesPush}Controller to `@metamask/messenger refactor: migrate {NotificationServices,NotificationServicesPush}Controller to @metamask/messenger Oct 7, 2025
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/notification-services-controller branch from 873453d to 1df4622 Compare October 7, 2025 11:38
mcmire
mcmire previously approved these changes Oct 7, 2025
Copy link
Contributor

@mcmire mcmire left a comment

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 queue Oct 27, 2025
Merged via the queue into main with commit 2f086aa Oct 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 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.

6 participants