fix(token-details): cp-7.72.0 make sticky swap defaults balance-aware#28057
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28057 +/- ##
==========================================
+ Coverage 82.61% 82.63% +0.02%
==========================================
Files 4849 4854 +5
Lines 124916 125109 +193
Branches 27873 27927 +54
==========================================
+ Hits 103199 103385 +186
+ Misses 14609 14603 -6
- Partials 7108 7121 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…kens and improve balance handling
|
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. |
…or clarity and balance handling
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - draft PR All E2E tests pre-selected. |
|
✅ E2E Fixture Validation — Schema is up to date |
|
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.
|
From discussion with @AmarildoGr, we may change the behaviour when to allow users to default swap by stables. |




Description
Implements balance-aware Swap defaults only for the sticky Swap button in Token Details.
When users tap the sticky Swap CTA from Token Details:
From = current tokenTo = swap defaultFrom = best available token (same existing selection logic used by sticky Buy flow)To = current tokenScope is intentionally narrow to avoid regressions in other swap entry points:
handleStickySwapPressinuseTokenActionsTokenDetailsStickyFooterto callonSwap(sticky-only handler)Changelog
CHANGELOG entry: Fixed Token Details sticky Swap button defaults to use a balance-aware source token selection.
Related issues
Fixes: N/A
Refs: https://consensyssoftware.atlassian.net/browse/ASSETS-2972 #28050
Manual testing steps
Screenshots/Recordings
Before
N/A
After
Tested in Offsite - Approval from @bergarces and @AmarildoGr
Pre-merge author checklist
Pre-merge reviewer checklist