-
-
Notifications
You must be signed in to change notification settings - Fork 253
refactor: migrate {Approval,Transaction,Network,GasFee,AssetsContract,Nft,Tokens}Controller messengers
#6386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: migrate {Approval,Transaction,Network,GasFee,AssetsContract,Nft,Tokens}Controller messengers
#6386
Conversation
ApprovalController to @metamask/messenger{Approval,Transaction,Network}Controller to @metamask/messenger
|
It looks like these changes cause some issues with the |
Ah, thanks for pointing that out! It looks like EDIT: I was able to go around this by adding a |
1292cb6 to
6210cf2
Compare
{Approval,Transaction,Network}Controller to @metamask/messenger{Approval,Transaction,Network}Controller and polling controllers to @metamask/messenger
c0c7c01 to
f482a84
Compare
{Approval,Transaction,Network}Controller and polling controllers to @metamask/messenger{Approval,Transaction,Network,GasFee}Controller to @metamask/messenger
b961f39 to
bf8b850
Compare
{Approval,Transaction,Network,GasFee}Controller to @metamask/messenger{Approval,Transaction,Network,GasFee,AssetsContract,Nft,Tokens}Controller messengers
| export const StaticIntervalPollingControllerNext = < | ||
| PollingInput extends Json, | ||
| >() => | ||
| StaticIntervalPollingControllerMixin<typeof BaseControllerNext, PollingInput>( | ||
| BaseControllerNext, | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been added to untangle gas-fee-controller from other polling controllers, and is being removed in #6444
|
Looks like there are conflicts :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Explanation
This PR migrates the
ApprovalController,TransactionController,GasFeeController,NetworkController,AssetsContractController,TokensControllerandNftControllerclasses to the new@metamask/messengercomm system along with their tests, as opposed to the one exported from@metamask/base-controller.The three packages are being migrated together because the
TransactionControllerIntegration.test.tsfile ties them together.References
Checklist
Note
Migrates major controllers to the new @metamask/messenger with updated state metadata and tests, adds StaticIntervalPollingControllerNext, and updates package configs and changelogs (breaking).
ApprovalController,TransactionController,NetworkController,GasFeeController,AssetsContractController,NftController,TokensControllerfromRestrictedMessengerto new@metamask/messenger.@metamask/base-controllerAPIs with@metamask/base-controller/nextwhere applicable; update state metadata keys (anonymous->includeInDebugSnapshot).this.messenger.registerActionHandler/subscribe/publish/call).StaticIntervalPollingControllerNext;GasFeeControllernow extends it.GasFeeMessengertype.@metamask/messengerdependency and TS project references across affected packages; adjust imports to/nextvariants.messengerlinks.Written by Cursor Bugbot for commit c2dee6e. This will update automatically on new commits. Configure here.