Skip to content

refactor: migrate AddressBookController to @metamask/messenger - #6383

Merged
mikesposito merged 19 commits into
mainfrom
mikesposito/messenger/address-book-controller
Oct 27, 2025
Merged

refactor: migrate AddressBookController to @metamask/messenger#6383
mikesposito merged 19 commits into
mainfrom
mikesposito/messenger/address-book-controller

Conversation

@mikesposito

@mikespositomikesposito commented Aug 26, 2025

Copy link
Copy Markdown
Member

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 ownersAugust 26, 2025 12:13
@mikespositomikesposito mentioned this pull request Aug 26, 2025
43 tasks
mcmire
mcmire previously approved these changes Aug 28, 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!

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

@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.

One minor thing Cursor noticed, but LGTM regardless.

contactUpdatedListener,
);
messenger.subscribe(
rootMessenger.subscribe(

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.

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

@cryptodev-2scryptodev-2s left a comment

Copy link
Copy Markdown
Contributor

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 mainOct 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 freeto 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.

3 participants

@mikesposito@mcmire@cryptodev-2s