Skip to content

Conversation

@melisaguevara
Copy link
Contributor

@melisaguevara melisaguevara commented Jan 7, 2026

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 refundOnOrigin to true (here) which is the behavior we want for requests coming from our FE.

Tests from API:

Test from FE:

@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
app-frontend-v3 Ready Ready Preview, Comment Jan 8, 2026 1:59pm
sepolia-frontend-v3 Ready Ready Preview, Comment Jan 8, 2026 1:59pm

@vercel
Copy link

vercel bot commented Jan 7, 2026

Deployment failed with the following error:

Hobby accounts are limited to daily cron jobs. This cron expression (* * * * *) would run more than once per day. Upgrade to the Pro plan to unlock all Cron Jobs features on Vercel.

Learn More: https://vercel.link/3Fpeeb1

Copy link
Contributor

@dohaki dohaki left a 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.

@melisaguevara
Copy link
Contributor Author

melisaguevara commented Jan 8, 2026

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
Tests still fail but now the fill is not being executed.

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.

@melisaguevara melisaguevara requested a review from dohaki January 8, 2026 14:19
Copy link
Contributor

@dohaki dohaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants