Skip to content

refactor: migrate ShieldController to @metamask/messenger - #6497

Merged
cryptodev-2s merged 9 commits into
mainfrom
cryptodev-2s/messenger/shield-controller
Oct 27, 2025
Merged

refactor: migrate ShieldController to @metamask/messenger#6497
cryptodev-2s merged 9 commits into
mainfrom
cryptodev-2s/messenger/shield-controller

Conversation

@cryptodev-2s

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

Copy link
Copy Markdown
Contributor

Explanation

This PR migrates ShieldController 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 ShieldController to @metamask/messenger, adds getState action, renames metadata key, and updates tests and configs accordingly.

  • Shield Controller:
    • Migrate to @metamask/messenger (replace RestrictedMessenger; switch to messenger.subscribe/publish/unsubscribe; import controller types from @metamask/base-controller/next).
    • Add ShieldControllerGetStateAction and export via src/index.ts.
    • Rename metadata key anonymous to includeInDebugSnapshot.
    • Update tests to new messenger API: introduce rootMessenger, adjust mocks and utils to use @metamask/messenger.
    • Add dependency @metamask/messenger; include TS references to packages/messenger.
  • Docs/Changelog/Graph:
    • Update changelog with added action and BREAKING changes.
    • README dependency graph: add shield_controller --> messenger and eip_7702_internal_rpc_middleware --> controller_utils.

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

@cryptodev-2scryptodev-2s self-assigned this Sep 8, 2025
@cryptodev-2s
cryptodev-2s requested review from a team as code ownersSeptember 8, 2025 14:13
@cryptodev-2scryptodev-2s changed the title refactor: migrate ShieldController to @metamask/messengerrefactor: migrate ShieldController to @metamask/messengerSep 8, 2025
@cryptodev-2scryptodev-2s mentioned this pull request Sep 8, 2025
43 tasks
Comment threadpackages/shield-controller/src/ShieldController.ts
@cryptodev-2s
cryptodev-2sforce-pushed the cryptodev-2s/messenger/shield-controller branch from 13b185c to 0517d4fCompareSeptember 24, 2025 13:58
@cryptodev-2s
cryptodev-2sforce-pushed the cryptodev-2s/messenger/shield-controller branch from 0517d4f to 84486cdCompareOctober 7, 2025 09:02
cursor[bot]

This comment was marked as outdated.

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!

cursor[bot]

This comment was marked as outdated.

Comment threadpackages/shield-controller/CHANGELOG.md Outdated
Comment threadpackages/shield-controller/package.json
Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
Comment threadpackages/shield-controller/package.json Outdated
@cryptodev-2s
cryptodev-2s added this pull request to the merge queueOct 27, 2025
Merged via the queue into main with commit 5f863deOct 27, 2025
266 of 272 checks passed
@cryptodev-2s
cryptodev-2s deleted the cryptodev-2s/messenger/shield-controller branch October 27, 2025 13:09
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.

4 participants

@cryptodev-2s@mcmire@Mrtenz@mikesposito