Skip to content

Conversation

@cryptodev-2s
Copy link
Contributor

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

Explanation

This PR migrates SelectedNetworkController 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 SelectedNetworkController to the new @metamask/messenger API, updates action/event typing via base-controller/next, renames metadata flag, and updates tests/config/docs accordingly.

  • SelectedNetworkController:
    • Migrate to @metamask/messenger Messenger; replace messagingSystem calls and handlers with messenger.
    • Adopt @metamask/base-controller/next types (ControllerGetStateAction, ControllerStateChangeEvent).
    • Update action/event/messenger types; keep get/setNetworkClientIdForDomain behavior and subscriptions.
    • Rename state metadata anonymous -> includeInDebugSnapshot.
  • Middleware/Tests:
    • Refactor tests to construct a root messenger and delegate the controller namespace; update middleware tests to use the new messenger.
  • Package/Config/Docs:
    • Add dependency @metamask/messenger and reference it in tsconfig project refs.
    • Update CHANGELOG.md with BREAKING changes (new messenger; metadata rename).
    • Refresh README dependency graph to show selected_network_controller --> messenger (and related edge additions).

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

@cryptodev-2s cryptodev-2s self-assigned this Sep 9, 2025
@cryptodev-2s cryptodev-2s requested review from a team as code owners September 9, 2025 09:46
@cryptodev-2s cryptodev-2s mentioned this pull request Sep 8, 2025
43 tasks
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/selected-network-controller branch from eda0482 to 6c07aa4 Compare September 9, 2025 10:03
mcmire
mcmire previously approved these changes Sep 10, 2025
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/selected-network-controller branch from 6c07aa4 to 06da7a5 Compare September 24, 2025 14:17
@cryptodev-2s cryptodev-2s requested a review from mcmire September 24, 2025 14:17
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/selected-network-controller branch from 06da7a5 to 7cc86e3 Compare October 7, 2025 09:04
@cryptodev-2s cryptodev-2s requested a review from a team as a code owner October 7, 2025 09:04
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!

@FrederikBolding FrederikBolding added this pull request to the merge queue Oct 27, 2025
@FrederikBolding FrederikBolding removed this pull request from the merge queue due to the queue being cleared Oct 27, 2025
@FrederikBolding FrederikBolding added this pull request to the merge queue Oct 27, 2025
Merged via the queue into main with commit 10b12ec Oct 27, 2025
256 of 257 checks passed
@FrederikBolding FrederikBolding deleted the cryptodev-2s/messenger/selected-network-controller branch October 27, 2025 12:15
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