-
Notifications
You must be signed in to change notification settings - Fork 65
chore: set refund on destination as the default #2150
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
c36ae18 to
6aadbdc
Compare
|
Deployment failed with the following error: Learn More: https://vercel.link/3Fpeeb1 |
dohaki
left a comment
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.
This looks great! The flaky e2e tests are still a bit annoying though... I got misled by the failure reason because this change results in successful fills. We should therefore explicitly set refundOnOrigin=true in the e2e tests.
@dohaki good call! I implemented that e2ab7cb and e5abbac I considered adding a destination refund test, but I'm not sure there's a reliable way to deterministically cause a swap to fail now that the API throws when slippage is set too low. So I decided to skip that for now. |
dohaki
left a comment
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.
Nice
Aiming to reduce the amount of refunded deposits, this PR sets refund on destination as the default behavior when a destination swap is required.
Note: FE is already explicitly setting
refundOnOrigintotrue(here) which is the behavior we want for requests coming from our FE.Tests from API:
Test from FE: