Fixes from Stephen's review

This commit is contained in:
James Grugett 2022-03-28 23:36:11 -05:00
parent ea51633caa
commit a2328587d0
2 changed files with 2 additions and 2 deletions

View File

@ -250,7 +250,7 @@ export function SellAmountInput(props: {
Sale proceeds{' '}
<span className="text-neutral">{formatMoney(saleValue)}</span>
</Row>
{prevLoanAmount && (
{!!prevLoanAmount && (
<Row className="items-center justify-between gap-2 text-gray-500">
<Row className="items-center gap-2">
Loan repaid{' '}

View File

@ -364,7 +364,7 @@ function SellPanel(props: {
const initialProb = getProbability(contract)
const { newPool } = calculateCpmmSale(contract, {
shares: amount ?? 0,
shares: Math.min(amount ?? 0, shares),
outcome: sharesOutcome,
})
const resultProb = getCpmmProbability(newPool, contract.p)