dydxprotocol / v4-web

Other
74 stars 61 forks source link

fix(tradeForm): cap slider at max leverage approximation for market orders #945

Closed moo-onthelawn closed 3 weeks ago

moo-onthelawn commented 3 weeks ago

the only real edit is here in the calculation of maxLeverage (which now reads maxLeverage off of tradeInputOptions). It still falls back to 1/imf (technically abacus should never return null but we have no way of enforcing that atm).

https://github.com/user-attachments/assets/23c7ead2-6169-4611-aab3-44dba8c51eab

also noticed that dropdown sizing was all weird when app store logos were in so did small css fix for that (reading the code, I'm pretty sure a google play item is also supposed to show lol next to the ios thing but I don't see it jk added the vercel variable into deployments)

before after
Screenshot 2024-08-22 at 11 34 36 AM Screenshot 2024-08-22 at 11 51 16 AM

Components

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v4-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 3:38pm
v4-testnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 3:38pm
linear[bot] commented 3 weeks ago

CT-1112 [cross] return max leverage calculation from abacus