Skip to content

Conversation

cryptodev-2s
Copy link
Contributor

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

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 API (from @metamask/base-controller), updating types/tests, metadata, and package/config files.

  • RateLimitController:
    • Switch to @metamask/base-controller/next and @metamask/messenger (replace RestrictedMessenger, adjust action/event types, use messenger.registerActionHandler).
    • Rename internal name to controllerName; update metadata flag to includeInDebugSnapshot.
  • Tests:
    • Rework messenger setup to use root Messenger with namespaces; update types and calls.
  • Package/Config:
    • Add dependency @metamask/messenger; add TS project references to messenger.
    • Update ESLint warning thresholds for RateLimitController file.
  • Changelog:
    • Note BREAKING change: controller now uses Messenger from @metamask/messenger.

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

mcmire
mcmire previously approved these changes Sep 10, 2025
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/rate-limit-controller branch from faa66e5 to 5ba04c4 Compare September 24, 2025 14:25
@cryptodev-2s cryptodev-2s requested review from a team as code owners September 24, 2025 14:25
@cryptodev-2s cryptodev-2s requested review from a team and mcmire September 24, 2025 14:25
@cryptodev-2s cryptodev-2s force-pushed the cryptodev-2s/messenger/rate-limit-controller branch from 5ba04c4 to b4e2db0 Compare October 7, 2025 09:08
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!

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.

Oops, noticed one thing.

@cryptodev-2s cryptodev-2s requested a review from a team as a code owner October 7, 2025 18:44
@cryptodev-2s cryptodev-2s requested a review from mcmire October 7, 2025 18:48
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!

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.

3 participants