-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: price API v3 upgrade #22876
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
base: main
Are you sure you want to change the base?
feat: price API v3 upgrade #22876
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. |
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.
Bug: Test Mocks Out of Sync
The mock setup still defines updateExchangeRatesByChainId but the test expectations were changed to call updateExchangeRates. This mismatch causes tests to fail because the mock method name doesn't match what the implementation calls.
app/components/UI/Tokens/util/refreshEvmTokens.test.ts#L20-L21
| TokenRatesController: { | |
| updateExchangeRatesByChainId: jest.fn(), |
Bug: Mock method mismatch breaks tests.
The mock setup still defines updateExchangeRatesByChainId but the test expectations were changed to call updateExchangeRates. This mismatch causes tests to fail because the mock method name doesn't match what the implementation calls.
app/components/UI/Tokens/util/refreshTokens.test.ts#L20-L21
metamask-mobile/app/components/UI/Tokens/util/refreshTokens.test.ts
Lines 20 to 21 in 7641d44
| TokenRatesController: { | |
| updateExchangeRatesByChainId: jest.fn(), |
Bug: Mock method mismatch breaks tests.
The mock setup still defines updateExchangeRatesByChainId but the test expectations were changed to call updateExchangeRates. This mismatch causes tests to fail because the mock method name doesn't match what the implementation calls.
app/components/UI/Tokens/util/tokenRefreshUtils.test.ts#L20-L21
| TokenRatesController: { | |
| updateExchangeRatesByChainId: jest.fn(() => Promise.resolve()), |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThis PR involves significant changes to core wallet functionality around token rates and asset controllers:
Selected Tags:
Risk Level: HIGH because:
Confidence: 85% - I've thoroughly investigated the changes and their impact through code analysis. The changes are clearly related to asset management and token rates, but the preview package nature adds some uncertainty about what else might be affected. |
|



Description
Upgrade assets-controllers to start using Price API v3 spot-prices endpoint.
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1575
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Upgrades assets-controllers to a preview build and updates code/tests to use
TokenRatesController.updateExchangeRates, while narrowing the TokenRatesController messenger scope.@metamask/assets-controllersto preview version89.0.1-preview-f83c2058via npm alias inpackage.jsonand lockfile.actionstoTokensController:getState,NetworkController:getStateandeventstoTokensController:stateChange,NetworkController:stateChangeinapp/core/Engine/messengers/token-rates-controller-messenger.ts.TokenRatesController.updateExchangeRatesByChainIdwithTokenRatesController.updateExchangeRatesintokenRefreshUtils.tsand related tests (Tokens,refreshEvmTokens,refreshTokens,tokenRefreshUtils,OnboardingSuccess).Written by Cursor Bugbot for commit fd5a5c1. This will update automatically on new commits. Configure here.