fix: add vsCurrency to trending request#29852
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
7c8747e
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b4c1391. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|




Description
Make sure this is merged only after MetaMask/core#8729
Fixes trending tokens to fetch and display prices in the user's selected currency instead of always defaulting to USD.
Problem
The trending tokens list was always fetching data in USD and displaying prices with USD formatting, regardless of the user's selected currency preference.
Solution
vsCurrencyparameter to thegetTrendingTokensAPI call, dynamically set to the user's selected currency from Redux storeTrendingTokenRowItemto format prices using the user's selected currency instead of defaulting to USDChangelog
CHANGELOG entry: Fetches trending tokens prices in user's selected currency
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3159
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-05-07.at.11.55.58.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Changes trending-token fetching and display to use the user’s selected fiat currency (adds
vsCurrencyand updates formatting), plus bumps@metamask/assets-controllersto107.0.0, which could affect API/query behavior.Overview
Trending tokens now fetch market data in the user’s selected currency by passing
vsCurrency(fromselectCurrentCurrency) throughuseTrendingRequestintogetTrendingTokens.The UI updates to render prices and market stats with the same currency, adding currency-aware helpers (
formatCompactCurrency,formatMarketStats(..., currency)) and wiring currency intoTrendingTokenRowItem. Call sites were updated for the assets-controller API rename (sortBy→sort). Tests were expanded to cover multi-currency formatting.Reviewed by Cursor Bugbot for commit 6ccc939. Bugbot is set up for automated code reviews on this repo. Configure here.