diff --git a/web/components/amount-input.tsx b/web/components/amount-input.tsx index d4724c2a..76111b6f 100644 --- a/web/components/amount-input.tsx +++ b/web/components/amount-input.tsx @@ -178,9 +178,10 @@ export function SellAmountInput(props: { ] const sellOutcome = yesShares ? 'YES' : noShares ? 'NO' : undefined - const shares = yesShares || noShares + const shares = Math.round(yesShares) || Math.round(noShares) + + const sharesSold = Math.min(amount ?? 0, shares) - const sharesSold = Math.min(amount ?? 0, yesShares || noShares) const { saleValue } = calculateCpmmSale( contract, sharesSold, diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 677e0197..cff37929 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -432,7 +432,13 @@ export function SellPanel(props: {