-
Notifications
You must be signed in to change notification settings - Fork 101
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
feat(swap-deadline): higher swap deadline #5002
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
3c3286a
to
38097e6
Compare
38097e6
to
b2877c6
Compare
if (order.class === 'limit') { | ||
legacyFeeQuoteParams.validFor = Math.round(PRICE_QUOTE_VALID_TO_TIME / 1000) | ||
} else { | ||
legacyFeeQuoteParams.validTo = timestamp(order.validTo) |
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.
validTo
has been removed completely for quote requests. Always use validFor
for everything now.
Quote responses still have it, as we use that as source of truth for current time.
@@ -48,7 +48,7 @@ import useNativeCurrency from 'lib/hooks/useNativeCurrency' | |||
|
|||
import * as styledEl from './styled' | |||
|
|||
const MAX_DEADLINE_MINUTES = 180 // 3h | |||
const MAX_DEADLINE_MINUTES = 60 * 12 // 12h |
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.
Max SWAP order deadline!!
Hey @alfetopito , works great! One more limitation that may cause difficulties with signing orders: when connected using WC, I got this error message in 5 minutes. So even if we set a quote validity longer than 5-10 minutes, users still face some limitations from other places. As for #4236 , it works as expected: orders can be placed, however, on the UI they won't be displayed correctly. Actually, that is why we show the warning at the top: |
d702411
to
d91fa22
Compare
As mentioned on slack, unrelated issue, fixed on #5016
That's unrelated to this change. Quote validity changes were purely backend. This (WC disconnection) is a different issue, which we do have a GH issue for already.
Then, both parts are working as expected \o/
|
I'll make sure the extended time only works for SC wallets and let you know |
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.
Great, @alfetopito , than k you!
Btw, should we mentioned somewhere in the docs about this change?
I don't know. Do we have anything about that in the docs already? Doesn't seem like it https://docs.cow.fi/search?q=deadline In that case, I wouldn't mention it. |
ffca04a
to
b9bb525
Compare
Update 2024-10-22
Testing
Summary
Part of #4321
#208
Increase SWAP deadline
validFor
instead of the absolutevalidTo
And since all times will now be relative, we might get rid of this warning:This still works, will keep it
To Test