-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
feat: migrate token balances controller to base controller v2 #3750
feat: migrate token balances controller to base controller v2 #3750
Conversation
5cdeec0
to
e125c97
Compare
2f9305f
to
8b2f042
Compare
For reference (from #3707):
|
Also, it seems like this controller should extend from |
missing types added |
Currently TokenBalancesController is not tied to NetworkController and if I correctly understood StaticIntervalPollingController require having networkClientId |
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.
Made a first pass on this. Nice work overall. I'll check back a bit later but this should cover most of it for now.
packages/assets-controllers/src/TokenBalancesController.test.ts
Outdated
Show resolved
Hide resolved
packages/assets-controllers/src/TokenBalancesController.test.ts
Outdated
Show resolved
Hide resolved
packages/assets-controllers/src/TokenBalancesController.test.ts
Outdated
Show resolved
Hide resolved
@cryptodev-2s @MajorLift Re: inheriting from StaticIntervalPollingController, I believe the purpose of that superclass is to ensure that polling can be performed in a multichain-compatible way. I don't think this controller has been converted to be multichain-compatible yet — I think it's still on the DevEx team's board to do that. So perhaps we stick with BaseControllerV2 for now and then if they see the need to migrate this class to StaticIntervalPollingController, they can do that, or we can if we end up taking it over from them. |
…s-controller-to-base-controller-v2
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.
Nice! Just a few more suggestions.
…s-controller-to-base-controller-v2
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.
Looks good!
Explanation
The
TokenBalancesController
has been migrated toBaseControllerV2
.References
Closes #1808
Changelog
@metamask/token-balances-controller
Changed
BaseControllerV2
messenger
and an optionalstate
,tokens
,interval
properties a disabled property has also been added.Checklist