-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: cp-7.57.2 remove currency rates multichain #21996
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
Conversation
|
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. |
|
I think we should also remove |
i think this one is needed for evm since it's using the |
|
Cal-L
left a comment
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



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.