Skip to content

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

Open
GuillaumeRx wants to merge 11 commits intomainfrom
gr/expose-assets-methods-messenger
Open

feat!: Expose Assets-owned controller/service methods through messenger#8164
GuillaumeRx wants to merge 11 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 because it changes messenger action/type definitions (including a breaking rename for AccountTrackerController action types) and broadens the set of methods exposed through messengers; runtime behavior is mostly refactoring to centralized registerMethodActionHandlers but could affect consumers’ imports and action wiring.

Overview
Exposes additional public methods from assets-owned controllers via their messengers (notably AssetsContractController:getStakedBalanceForChain, MultichainAssetsRatesController:fetchHistoricalPricesForAsset, and multiple TokenDetectionController/TokensController actions), and updates package exports so consumers can import the new action types.

Refactors affected controllers to use MESSENGER_EXPOSED_METHODS + messenger.registerMethodActionHandlers(...) and replaces hand-written action type unions with auto-generated *-method-action-types.ts files; breaking rename standardizes AccountTrackerController messenger action type names to include Controller. Adds tsx and new generate-method-action-types scripts, updates tests accordingly, and records the changes in the assets-controllers changelog.

Written by Cursor Bugbot for commit 6ea81c2. 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 from cbade6a to 9794542 Compare March 10, 2026 17:54
@GuillaumeRx GuillaumeRx force-pushed the gr/expose-assets-methods-messenger branch from 1790154 to 6ea81c2 Compare March 11, 2026 10:18
NetworkConfig,
} from './NetworkEnablementController';

export type {
Copy link
Contributor

@cryptodev-2s cryptodev-2s Mar 11, 2026

Choose a reason for hiding this comment

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

I think you may have missed CHANGELOG entries for changes in NetworkEnablementController

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch !

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.

2 participants