Skip to content

Conversation

@cryptodev-2s
Copy link
Contributor

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

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-2s cryptodev-2s self-assigned this Sep 8, 2025
@cryptodev-2s cryptodev-2s requested review from a team as code owners September 8, 2025 14:13
@cryptodev-2s cryptodev-2s changed the title refactor: migrate ShieldController to @metamask/messenger refactor: migrate ShieldController to @metamask/messenger Sep 8, 2025
@cryptodev-2s cryptodev-2s mentioned this pull request Sep 8, 2025
43 tasks
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/shield-controller branch from 13b185c to 0517d4f Compare September 24, 2025 13:58
@cryptodev-2s cryptodev-2s requested a review from mcmire September 24, 2025 13:58
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/shield-controller branch from 0517d4f to 84486cd Compare October 7, 2025 09:02
cursor[bot]

This comment was marked as outdated.

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.

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
@cryptodev-2s cryptodev-2s added this pull request to the merge queue Oct 27, 2025
Merged via the queue into main with commit 5f863de Oct 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 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.

5 participants