Skip to content

refactor: migrate RateLimitController to @metamask/messenger - #6503

Merged
FrederikBolding merged 8 commits into
mainfrom
cryptodev-2s/messenger/rate-limit-controller
Oct 27, 2025
Merged

refactor: migrate RateLimitController to @metamask/messenger#6503
FrederikBolding merged 8 commits into
mainfrom
cryptodev-2s/messenger/rate-limit-controller

Conversation

@cryptodev-2s

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

Copy link
Copy Markdown
Contributor

Explanation

This PR migrates RateLimitController 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 RateLimitController to the new @metamask/messenger, updates types/tests, and renames metadata flag; adds dependency and updates docs/config.

  • @metamask/rate-limit-controller:
    • Migrate from RestrictedMessenger (base-controller) to Messenger from @metamask/messenger and BaseController from @metamask/base-controller/next.
    • Update action registration to messenger.registerActionHandler and adjust types (RateLimitMessenger, action/event types, controllerName).
    • Rename metadata field anonymous to includeInDebugSnapshot.
    • Update tests to construct root and namespaced messengers via @metamask/messenger.
    • Add dependency @metamask/messenger@^0.3.0; update TS project references.
    • Changelog: note BREAKING changes for messenger migration and metadata rename.
  • Repo Docs/Config:
    • README dependency graph: add rate_limit_controller --> messenger; add eip_7702_internal_rpc_middleware --> controller_utils.
    • ESLint warning thresholds: adjust entries for RateLimitController.ts.

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

mcmire
mcmire previously approved these changes Sep 10, 2025
@cryptodev-2s
cryptodev-2sforce-pushed the cryptodev-2s/messenger/rate-limit-controller branch from faa66e5 to 5ba04c4CompareSeptember 24, 2025 14:25
@cryptodev-2s
cryptodev-2s requested review from a team as code ownersSeptember 24, 2025 14:25
@cryptodev-2s
cryptodev-2s requested review from a team and mcmireSeptember 24, 2025 14:25
@cryptodev-2s
cryptodev-2sforce-pushed the cryptodev-2s/messenger/rate-limit-controller branch from 5ba04c4 to b4e2db0CompareOctober 7, 2025 09:08

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

Comment threadpackages/remote-feature-flag-controller/tsconfig.build.json Outdated

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

Oops, noticed one thing.

@cryptodev-2s
cryptodev-2s requested a review from a team as a code ownerOctober 7, 2025 18:44
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.

@FrederikBolding
FrederikBolding added this pull request to the merge queueOct 27, 2025
auto-merge was automatically disabled October 27, 2025 11:43

Pull Request is not mergeable

@FrederikBolding
FrederikBolding removed this pull request from the merge queue due to a manual request Oct 27, 2025
@FrederikBolding
FrederikBolding added this pull request to the merge queueOct 27, 2025
Merged via the queue into main with commit dfa086aOct 27, 2025
256 of 257 checks passed
@FrederikBolding
FrederikBolding deleted the cryptodev-2s/messenger/rate-limit-controller branch October 27, 2025 12:23
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.

5 participants

@cryptodev-2s@mcmire@Mrtenz@FrederikBolding@mikesposito