-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: enable spot-prices v3 #38393
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: enable spot-prices v3 #38393
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. |
✨ Files requiring CODEOWNER review ✨🧪 @MetaMask/qa (1 files, +4 -9)
|
| statusCode: 200, | ||
| json: { | ||
| '0x0000000000000000000000000000000000000000': { | ||
| 'eip155:1/slip44:60': { |
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: Hardcoded mainnet asset ID in price API mock
The spot prices mock is hardcoded to only respond to requests for eip155:1/slip44:60 (Ethereum mainnet), but tests run on various networks including localhost with chainId 1337. The chainId parameter passed to setupMocking is ignored, causing price API requests to fail for non-mainnet tests that don't provide a testSpecificMock. The mock should dynamically construct the asset ID based on the provided chainId parameter to support all test networks.
Builds ready [b288034]
UI Startup Metrics (1230 ± 100 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [21bfcd8]
UI Startup Metrics (1206 ± 86 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Enable spot prices v3 by removing patch forcing a fallback.
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1746
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Switches token price fetching to v3 using CAIP-19 asset IDs, updates all E2E/integration mocks and tests accordingly, adds
moncurrency, and lowercases account keys when storing token balances.v2/chains/{chainId}/spot-pricestov3/spot-priceswithassetIds(CAIP-19, e.g.,eip155:1/slip44:60,eip155:1/erc20:<addr>).assetIds,vsCurrency,includeMarketData).mockSpotPrices,mockEmptyPrices, etc.) to v3.TokenBalancesController: store balances under lowercasedaccountkeys.montoSUPPORTED_CURRENCIES.Written by Cursor Bugbot for commit 21bfcd8. This will update automatically on new commits. Configure here.