You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some tools can be unstable on Li.Fi, i.e they won't be present from one call to the other, not because this route does not exist anymore (you can absolutely execute it and it will go through) but rather because of some Li.Fi internal issues, see e.g Enso in screenshots/additional details section which is a known unstable route which you're close to 100% guaranteed not to get from one call to the other.
When this happens, the swapper will blank out:
This has been introduced by the Li.Fi switch to final quotes work in #8326. The whole idea of Li.Fi not fetching final quotes was to avoid that, and while we thought we were safe when testing this PR, this can still happen under rare circumstances for some swappers (e.g Enso here, but e.g 1inch and ZRX tools can sometimes have the same behaviour).
Gut feel is the best way to handle this is to catch those specific failures (tool not available anymore at quote time) and return the rate mutated with quoteOrRate: 'quote' in this specific edge-case, which would be akin to what we were doing before.
Ideally, we would not want to add some spaghetty-y conditions in web again, so the cleanest way (IMO) would be to pass the original rate to getTradeQuote(), and return that with {...rate, quoteOrRate: 'quote'}, this way we can follow the usual pattern, no spaghetty.
Overview
Some tools can be unstable on Li.Fi, i.e they won't be present from one call to the other, not because this route does not exist anymore (you can absolutely execute it and it will go through) but rather because of some Li.Fi internal issues, see e.g Enso in screenshots/additional details section which is a known unstable route which you're close to 100% guaranteed not to get from one call to the other.
When this happens, the swapper will blank out:
This has been introduced by the Li.Fi switch to final quotes work in #8326. The whole idea of Li.Fi not fetching final quotes was to avoid that, and while we thought we were safe when testing this PR, this can still happen under rare circumstances for some swappers (e.g Enso here, but e.g 1inch and ZRX tools can sometimes have the same behaviour).
Gut feel is the best way to handle this is to catch those specific failures (tool not available anymore at quote time) and return the rate mutated with quoteOrRate: 'quote' in this specific edge-case, which would be akin to what we were doing before.
Ideally, we would not want to add some spaghetty-y conditions in web again, so the cleanest way (IMO) would be to pass the original rate to getTradeQuote(), and return that with {...rate, quoteOrRate: 'quote'}, this way we can follow the usual pattern, no spaghetty.
References and additional details
Acceptance Criteria
Need By Date
No response
Screenshots/Mockups
https://jam.dev/c/9241dff2-4c51-47d8-93be-5a62c84379a7
Estimated effort
No response
The text was updated successfully, but these errors were encountered: