-
Notifications
You must be signed in to change notification settings - Fork 5k
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
chore: refactor and unify low return warning #29918
chore: refactor and unify low return warning #29918
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. |
Builds ready [ca439f6]
Page Load Metrics (1786 ± 110 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [6c2cc08]
Page Load Metrics (1805 ± 76 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
), | ||
) | ||
: false; | ||
setIsEstimatedReturnLow(isEstimatedReturnLow); |
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.
nit: maybe better to import this logic from a util file?
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.
approved with nit
Builds ready [bcdc0de]
Page Load Metrics (1873 ± 125 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [f77e3a4]
Page Load Metrics (1993 ± 81 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [44c1587]
Page Load Metrics (2011 ± 131 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [981a5e3]
Page Load Metrics (1641 ± 71 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Users are experiencing issues with receiving significantly lower amounts of destination tokens than expected during swaps. This is due to excessive price differentials between the estimated swap amount and the actual return. Currently, the logic for triggering a low return warning differs between swaps and bridges, leading to inconsistencies and user confusion.
This PR brings swap to parity with bridge by adding a warning when a swap results in a return below 80% of the value of the source tokens.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist