fix: cp-7.57.2 remove currency rates multichain#21996
Merged
Merged
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Contributor
|
I think we should also remove |
Contributor
Author
i think this one is needed for evm since it's using the |
bergarces
approved these changes
Oct 31, 2025
Prithpal-Sooriya
approved these changes
Oct 31, 2025
sahar-fehri
approved these changes
Oct 31, 2025
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



Description
This PR removes the
RatesControllerto reduce redundant CryptoCompare API calls in the multichain architecture.Reason for the change
The
RatesControllerwas introduced for fetching cryptocurrency conversion rates (primarily for BTC and SOL) to support non-EVM chains. However, this resulted in duplicate API calls to CryptoCompare since we already haveMultichainAssetsRatesControllerandTokenRatesControllerhandling rate fetching functionality. This redundancy increased API usage unnecessarily.Improvement/solution
RatesControllerinitialization and configuration from the EngineRatesControllermessenger setup and related controller initialization filesRatesControllerstate (selectMultichainConversionRate,selectMultichainCoinRates)RatesControllerreferencesThe existing
MultichainAssetsRatesControllerandTokenRatesControllerwill continue to handle all rate-fetching needs without the additional overhead ofRatesController.Changelog
CHANGELOG entry: Removed redundant RatesController to optimize API usage
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Removes RatesController across Engine, messengers, selectors, and types; adds migration 106 to purge its persisted state; updates tests and fixtures.
RatesControllerinitialization, context exposure, polling, and state-change subscriptions inEngine.tsandconstants.ts.rates-controller-initand its tests; deleterates-controller-messengerand references inmessengers/index.ts.selectMultichainConversionRateandselectMultichainCoinRates; updatemultichain.tsand related tests accordingly.RatesControllertypes and entries fromtypes.ts(controllers, state, actions/events, controller names).106to removebackgroundState.RatesController; register inmigrations/index.tswith tests.initial-background-state.jsonto omitRatesController.Engine.test.tsassertions to no longer expectRatesController.Written by Cursor Bugbot for commit da413b8. This will update automatically on new commits. Configure here.