Skip to content

feat!: Expose Assets-owned controller/service methods through messenger#8164

Merged
GuillaumeRx merged 13 commits intomainfrom
gr/expose-assets-methods-messenger
Mar 11, 2026
Merged

feat!: Expose Assets-owned controller/service methods through messenger#8164
GuillaumeRx merged 13 commits intomainfrom
gr/expose-assets-methods-messenger

Conversation

@GuillaumeRx
Copy link
Contributor

@GuillaumeRx GuillaumeRx commented Mar 10, 2026

Explanation

Exposes all the public methods other than internally used methods of the assets-owned controllers/services through the messenger.

This also refactors how actions are defined and bound to the messenger using registerMethodActionHandlers and MESSENGER_EXPOSED_METHODS.

The generate-method-action-type script was used to generate the action types.

This is a breaking change in the AccountTrackerController package as some of the action type names changed but none of the underlying signatures changed.

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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Medium risk due to widespread refactor of messenger action typing/registration across assets and network enablement controllers, including breaking TypeScript type renames that can impact downstream builds. Runtime behavior should be mostly unchanged, but incorrect MESSENGER_EXPOSED_METHODS lists could unintentionally expose/omit actions.

Overview
Standardizes how multiple controllers expose public methods via the messenger by switching from per-action registerActionHandler code to registerMethodActionHandlers with explicit MESSENGER_EXPOSED_METHODS allowlists.

Adds auto-generated *-method-action-types.ts files (and new generate-method-action-types scripts/tsx dev dependency) and updates exports/imports accordingly, including newly exposed actions such as AssetsContractController:getStakedBalanceForChain, MultichainAssetsRatesController:fetchHistoricalPricesForAsset, and several TokenDetectionController/TokensController methods.

Introduces breaking renames of messenger action type aliases (not action strings) for AccountTrackerController and NetworkEnablementController, and updates related tests/changelogs to match.

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

@GuillaumeRx GuillaumeRx marked this pull request as ready for review March 10, 2026 15:16
@GuillaumeRx GuillaumeRx requested review from a team as code owners March 10, 2026 15:16
@GuillaumeRx GuillaumeRx force-pushed the gr/expose-assets-methods-messenger branch from d7491b8 to c0b6e4c Compare March 10, 2026 15:18
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@GuillaumeRx GuillaumeRx force-pushed the gr/expose-assets-methods-messenger branch 2 times, most recently from 1790154 to 6ea81c2 Compare March 11, 2026 10:18
@GuillaumeRx GuillaumeRx force-pushed the gr/expose-assets-methods-messenger branch from 4936245 to c02571d Compare March 11, 2026 13:16
@GuillaumeRx GuillaumeRx enabled auto-merge March 11, 2026 13:22
@GuillaumeRx GuillaumeRx added this pull request to the merge queue Mar 11, 2026
Merged via the queue into main with commit f9025d3 Mar 11, 2026
324 checks passed
@GuillaumeRx GuillaumeRx deleted the gr/expose-assets-methods-messenger branch March 11, 2026 13:31
@cursor cursor bot mentioned this pull request Mar 16, 2026
4 tasks
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.

3 participants