Skip to content

Conversation

@cryptodev-2s
Copy link
Contributor

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

Explanation

This PR migrates PreferencesController 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 PreferencesController to the new @metamask/messenger API and renames metadata anonymous to includeInDebugSnapshot, with corresponding test, config, and docs updates.

  • Preferences Controller:
    • Migrate from RestrictedMessenger (@metamask/base-controller) to Messenger (@metamask/messenger); import BaseController/deriveStateFromMetadata from @metamask/base-controller/next.
    • Rename metadata property anonymous to includeInDebugSnapshot across state metadata.
    • Update PreferencesControllerMessenger type to use @metamask/messenger and adjust allowed events typing.
  • Tests:
    • Replace helper messenger construction with root Messenger + delegated namespace; update imports/types accordingly.
    • Update metadata derivation calls to use includeInDebugSnapshot.
  • Build/Config:
    • Add dependency @metamask/messenger and TS project references.
  • Docs:
    • Update README dependency graph to show preferences_controller --> messenger and add eip_7702_internal_rpc_middleware --> controller_utils.
  • Changelog:
    • Document breaking changes for messenger migration and metadata rename.

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

mcmire
mcmire previously approved these changes Sep 10, 2025
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/preferences-controller branch from 2a6a69e to 63e6be6 Compare September 24, 2025 14:31
@cryptodev-2s cryptodev-2s requested a review from a team September 24, 2025 14:32
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/preferences-controller branch from 63e6be6 to 003ae8f Compare October 7, 2025 09:10
cursor[bot]

This comment was marked as outdated.

@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/preferences-controller branch from 003ae8f to 9e1042e Compare October 7, 2025 09:11
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!

cursor[bot]

This comment was marked as outdated.

@FrederikBolding FrederikBolding added this pull request to the merge queue Oct 27, 2025
Merged via the queue into main with commit 3e32d72 Oct 27, 2025
326 of 506 checks passed
@FrederikBolding FrederikBolding deleted the cryptodev-2s/messenger/preferences-controller branch October 27, 2025 12:35
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