Skip to content

Conversation

@mikesposito
Copy link
Member

@mikesposito mikesposito commented Sep 3, 2025

Explanation

This PR migrates all controllers extending StaticIntervalPollingController to use @metamask/messenger instead of @metamask/base-controller. This is part of a larger effort to migrate all controllers to use @metamask/messenger.

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 polling infrastructure and multiple controllers to use @metamask/messenger, updates state metadata APIs/tests, and adjusts dependencies and exports across affected packages.

  • Messenger migration:
    • Replace RestrictedMessenger with @metamask/messenger across controllers: AccountTrackerController, CurrencyRateController, DeFiPositionsController, MultichainAssetsRatesController, TokenBalancesController, TokenDetectionController, TokenListController, TokenRatesController, BridgeController, BridgeStatusController, and SubscriptionController.
    • Update tests to construct/delegate new Messenger instances; switch deriveStateFromMetadata imports to @metamask/base-controller/next.
  • Polling infrastructure:
    • Refactor StaticIntervalPollingController and BlockTrackerPollingController to use @metamask/messenger; remove StaticIntervalPollingControllerNext.
    • Update GasFeeController to extend StaticIntervalPollingController.
  • State metadata/API:
    • Rename metadata flag anonymous to includeInDebugSnapshot and adjust usage in controllers/tests.
  • Bridge package:
    • Add and export BridgeControllerGetStateAction and BridgeControllerStateChangeEvent types; integrate messenger for actions/subscriptions; fetch/track calls updated.
  • Subscription package:
    • Migrate controller to new messenger; wire authentication actions/events; update polling and handlers.
  • Changelogs/deps:
    • Update changelogs to note BREAKING changes; add @metamask/messenger dependencies; update TS references; minor README dependency graph tweaks.

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

@mikesposito mikesposito force-pushed the mikesposito/messenger/approval-controller branch from bf8b850 to 31c7ee0 Compare September 3, 2025 20:39
@Gudahtt Gudahtt force-pushed the mikesposito/messenger/polling-controllers branch from 0f39c68 to 221243e Compare October 24, 2025 18:53
cryptodev-2s
cryptodev-2s previously approved these changes Oct 26, 2025
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!

Base automatically changed from mikesposito/messenger/approval-controller to main October 27, 2025 11:25
@FrederikBolding FrederikBolding dismissed cryptodev-2s’s stale review October 27, 2025 11:25

The base branch was changed.

cursor[bot]

This comment was marked as outdated.

cryptodev-2s
cryptodev-2s previously approved these changes Oct 27, 2025
@mikesposito mikesposito enabled auto-merge October 27, 2025 12:12
@mikesposito mikesposito dismissed mcmire’s stale review October 27, 2025 12:14

requested changes already applied

@mikesposito mikesposito added this pull request to the merge queue Oct 27, 2025
Merged via the queue into main with commit 4b5929b Oct 27, 2025
255 checks passed
@mikesposito mikesposito deleted the mikesposito/messenger/polling-controllers branch October 27, 2025 12:54
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