feat!: Expose Assets-owned controller/service methods through messenger#8164
Open
GuillaumeRx wants to merge 11 commits intomainfrom
Open
feat!: Expose Assets-owned controller/service methods through messenger#8164GuillaumeRx wants to merge 11 commits intomainfrom
GuillaumeRx wants to merge 11 commits intomainfrom
Conversation
d7491b8 to
c0b6e4c
Compare
packages/assets-controllers/src/MultichainAssetsRatesController/index.ts
Show resolved
Hide resolved
packages/network-enablement-controller/src/NetworkEnablementController.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
cbade6a to
9794542
Compare
… `network-enablement-controller`
… `assets-controllers`
1790154 to
6ea81c2
Compare
| NetworkConfig, | ||
| } from './NetworkEnablementController'; | ||
|
|
||
| export type { |
Contributor
There was a problem hiding this comment.
I think you may have missed CHANGELOG entries for changes in NetworkEnablementController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
registerMethodActionHandlersandMESSENGER_EXPOSED_METHODS.The
generate-method-action-typescript was used to generate the action types.This is a breaking change in the
AccountTrackerControllerpackage as some of the action type names changed but none of the underlying signatures changed.References
Checklist
Note
Medium Risk
Medium risk because it changes messenger action/type definitions (including a breaking rename for
AccountTrackerControlleraction types) and broadens the set of methods exposed through messengers; runtime behavior is mostly refactoring to centralizedregisterMethodActionHandlersbut 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 multipleTokenDetectionController/TokensControlleractions), 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.tsfiles; breaking rename standardizesAccountTrackerControllermessenger action type names to includeController. Addstsxand newgenerate-method-action-typesscripts, updates tests accordingly, and records the changes in theassets-controllerschangelog.Written by Cursor Bugbot for commit 6ea81c2. This will update automatically on new commits. Configure here.