-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Convert TokenRatesController from BaseControllerV1 to BaseControllerV2 #4076
Labels
Comments
29 tasks
desi
changed the title
(
Convert TokenRatesController from BaseControllerV1 to BaseControllerV2
Mar 18, 2024
assets-controllers
) TokenRatesController
|
3 tasks
kanthesha
added a commit
that referenced
this issue
Jun 8, 2024
## Explanation <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes. * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> In this, the TokenRatesController has been upgraded to BaseControllerV2. The upgrade includes TokenRatesController inheriting BaseController v2 instead of BaseController v1. This affects the constructor and the also the way state is updated inside the controller, but it also prompts other changes: This also includes the changes to the unit tests, so that all the tests uses `withController` pattern. ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? For example: * Fixes #12345 * Related to #67890 --> Fixes #4076 ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> `@metamask/assets-controller` ### Added - New types for `TokenRatesController `messenger actions - `TokenRatesControllerGetStateAction` - New types for `TokenRatesController` messenger events - `TokenRatesControllerStateChangeEvent` ### Changed - **BREAKING:** Changed superclass of `TokenRatesController` from BaseController v1 to BaseController v2 - **BREAKING:** Renamed `TokenRatesState` to `TokenRatesControllerState` ### Removed - **BREAKING:** Removed `TokenRatesConfig` type ## 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
github-project-automation
bot
moved this from Needs dev review
to Merged, Closed or Archived
in PR review queue
Jun 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Considering that converting TokenDetectionController to BaseController v2 took longer than expected due to unforeseen changes, we want to be more conscientious about converting TokenRatesController.
Figure out all of the changes we would want to make in upgrading this controller, outline those changes here and create new tickets if appropriate.
The text was updated successfully, but these errors were encountered: