You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TokenBalancesController still inherits from BaseController (v1). In order to make all of our controllers consistent, we need to migrate this controller to BaseControllerV2.
Please use #1705 (PhishingController) as a recent reference for this type of migration.
The text was updated successfully, but these errors were encountered:
## Explanation
The `TokenBalancesController` has been migrated to `BaseControllerV2`.
## References
Closes#1808
## Changelog
### `@metamask/token-balances-controller`
#### Changed
- **BREAKING:** Convert to `BaseControllerV2`
- The constructor parameters have changed; rather than accepting a
"config" parameter for interval and tokens we now pass both values as
controller options, and a "state" parameter, there is now just a single
object for all constructor arguments. This object has a mandatory
`messenger` and an optional `state`, `tokens`, `interval` properties a
disabled property has also been added.
- State now saves tokens balances as hex and not as a BNs.
- Additional BN export has been removed as it was intended to be removed
in the next major release.
## Checklist
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
TokenBalancesController still inherits from BaseController (v1). In order to make all of our controllers consistent, we need to migrate this controller to BaseControllerV2.
Please use #1705 (PhishingController) as a recent reference for this type of migration.
The text was updated successfully, but these errors were encountered: