fix: distinguish swaps trending token details source#28128
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. |
10145d9
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
No functional behavior changes — only analytics metadata in navigation params is affected. Default behavior of Tag selection rationale:
Performance tests are not warranted — these are pure analytics metadata changes with no rendering, data loading, or performance-sensitive code paths affected. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|



Description
This change separates swaps-trending token detail navigation from the generic explore trending flow so MetaMetrics can attribute those entry points correctly.
It adds a dedicated
trending-swapstoken details source, passes that source from the Bridge/Swaps trending section intoTrendingTokenRowItem, and keeps the defaulttrendingsource for existing explore-tab behavior. The added test coverage verifies the swaps-trending navigation params include the new source.Changelog
CHANGELOG entry: null
Related issues
Fixes: SWAPS-4306
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Small, scoped change to navigation params/analytics attribution with a default preserving existing behavior; minimal functional risk aside from potential analytics mislabeling if miswired.
Overview
Routes opened from the Swaps/Bridge trending tokens section now pass a dedicated token-details
sourcevalue (TokenDetailsSource.TrendingSwaps) instead of the generic trending source, allowing analytics to distinguish entry points.This introduces the new
trending-swapsenum value, adds an optionaltokenDetailsSourceprop toTrendingTokenRowItem(defaulting toTrending), and updates tests to assert the Bridge section forwards the source and that navigation params includesource: 'trending-swaps'when provided.Written by Cursor Bugbot for commit 6909921. This will update automatically on new commits. Configure here.