blockworks-foundation / mango-ui-v3

Mango Markets V3 UI
https://trade.mango.markets
GNU Affero General Public License v3.0
84 stars 114 forks source link

Handle margined deposit balances in SpotMax #396

Closed ImpossiblePairs closed 1 year ago

ImpossiblePairs commented 1 year ago

Problem: Spot sell - spotMax reflects availableBalance when using the percent buttons and margin unselected Changes: Spot sell - spotMax reflects depositBalance when using the percent buttons and margin unselected

Image below (left: spotMax before change, right: spotMax after change, bottom: Balance) image

In the above balance is 0.043109999, so it rounds to 0.0432 in balance, but 0.0431 is all that's available to sell at the 4 digit step size.

vercel[bot] commented 1 year ago

@ImpossiblePairs is attempting to deploy a commit to the blockworks-foundation Team on Vercel.

A member of the Team first needs to authorize it.