Closed NikolaiYurchenko closed 1 year ago
Please test this PR on: https://v2-staging-429-dot-fuji-306908.ey.r.appspot.com
failureForMode
check since the idea is to always trigger the meta update (as long as there's an active vault, we simply don't want to check anymore and this means passing 0
if input: ''
)meta
as soon as we have an active vault (we already do when changing it)0
to the preview calls works for all 'modes'Made the PR into a draft again since there's still a lot to do.
@NikolaiYurchenko turned the PR into a draft again and added a checklist.
@brozorec when calling preview
calls in a cross-chain operation and we pass 0 in both amount fields, we get the following error from the sdk
:
Sdk error while attempting to set meta: division-by-zero [ See: https://links.ethers.org/v5-errors-NUMERIC_FAULT-division-by-zero ] (fault="division-by-zero", operation="div", code=NUMERIC_FAULT, version=bignumber/5.7.0)
@ferostar @NikolaiYurchenko great job on this and the following PR :muscle:
I have these suggestions to improve the warning messages and the routing modal:
"Based on your selection, we've noticed that you have an open WETH/USDC position on (icon) Optimism. You may proceed to manage it."
Replace WETH, USDC and Optimisim with the corresponding values.
[x] 2. when there's more than one route
"Based on your selection, we've noticed that you have an open WETH/USDC position on (icon) Optimism. You may proceed to manage it.
If you're trying to open a similar position on another chain, please [select a different route]."
[x] Regarding the routing modal, displaying zeros may be confusing, so I suggest hiding them:
[x] when routes are empty We may display the following:
[ ] when routes are populated We may display the following:
Another important issue @brozorec is that we just don't show the routing modal on a mobile device.
Turned the comments above into checklists so it's clear what remains to be done
Message changed, on mobile underline is hidded, returned input check becase Mark told me to do it
Have a look @brozorec !
I removed the chain icon because it didn't look good (sorry about that). I also used the vault values because a position is determined by the vault where it was open, not by the start and the end step. The steps define only the route.
Warning block on Borrow page to show in same open position exists