-
Notifications
You must be signed in to change notification settings - Fork 30
ux: Implement dynamic Price Impact color warnings #89
Copy link
Copy link
Closed
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Description
Users don't always read the small text for Price Impact when executing a trade. We need to use color psychology to warn them of bad trades.
The percentage text should dynamically change color based on how severe the impact is.
This gives instant, peripheral visual feedback that a trade might be dangerous.
It is a standard DeFi feature that prevents angry users from losing funds to slippage.
Requirements
- Locate the "Price Impact" display inside the main Swap card component.
- Add logic to check the
priceImpactvalue. - If
< 1%, apply a green Tailwind class (text-emerald-400). - If
>= 1%and< 3%, apply a yellow warning class (text-yellow-400). - If
>= 3%, apply a bold red danger class (text-red-500).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program