Skip to content

Conversation

@mikesposito
Copy link
Member

@mikesposito mikesposito commented Aug 26, 2025

Explanation

This PR migrates the AddressBookController class to the new @metamask/messenger comm system, 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 AddressBookController to the new @metamask/messenger API, updates metadata flag, tests, and package references.

  • Address Book Controller:
    • Switch to @metamask/messenger and @metamask/base-controller/next APIs; update AddressBookControllerMessenger type.
    • Replace messagingSystem.publish/registerActionHandler with messenger.publish/registerActionHandler.
    • Rename metadata flag from anonymous to includeInDebugSnapshot.
  • Tests (packages/address-book-controller/src/AddressBookController.test.ts):
    • Use new Messenger with root/namespace setup; subscribe via root messenger.
    • Update metadata assertions to includeInDebugSnapshot.
  • Package/Build/Docs:
    • Add dependency @metamask/messenger and TS project references; update README dependency graph.
    • Changelog: note BREAKING changes for new messenger and metadata flag rename.

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

@mikesposito mikesposito marked this pull request as ready for review August 26, 2025 12:13
@mikesposito mikesposito requested review from a team as code owners August 26, 2025 12:13
@mikesposito mikesposito mentioned this pull request Aug 26, 2025
43 tasks
mcmire
mcmire previously approved these changes Aug 28, 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.

@mikesposito mikesposito enabled auto-merge (squash) September 23, 2025 09:59
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.

One minor thing Cursor noticed, but LGTM regardless.

contactUpdatedListener,
);
messenger.subscribe(
rootMessenger.subscribe(
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, yes. Perhaps we can remove the other type assertion?

Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@mikesposito mikesposito merged commit 6de2b6d into main Oct 27, 2025
256 of 257 checks passed
@mikesposito mikesposito deleted the mikesposito/messenger/address-book-controller branch October 27, 2025 10:01
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.

4 participants