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
{{ message }}
Repository navigation
Percentage buttons (conversion / cashout '100%') round the raw balance up to an unsendable amount #696
Found during the #695 review. The percentage quick-buttons Math.round the raw fractional-cent balance (conversion-details-screen.tsx:~110, CashoutDetails.tsx:~209), so on a wallet holding 109.9346 cents, tapping 100% sets 110¢ — more than is spendable. In cashout this drives the user straight into the max-amount error (now floored by #695, so at least the error is honest); in conversion it sets an amount the swap can't fill.
Fix mirrors #689/#695's rule: for the 100% case, floor to whole spendable minor units (toSpendableBalance from #695); for partial percentages, Math.floor instead of Math.round keeps every quick-set amount ≤ spendable.
Related: #689 (send-flow MAX — does NOT cover these buttons), #690/#695 (display floor), flash#480 (fractional balances).
Activity