From f7d4926d224740122a744c8c6c4978a2cd853915 Mon Sep 17 00:00:00 2001 From: jahooma Date: Mon, 3 Jan 2022 00:57:22 -0600 Subject: [PATCH] Update to show sale price in column --- web/components/bets-list.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 29d51346..0d0f588f 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -258,7 +258,7 @@ export function ContractBetsTable(props: { Amount Probability Shares - {isResolved ? <>Payout : <>Current value} + {isResolved ? <>Payout : <>Sale price} @@ -309,7 +309,7 @@ function BetRow(props: { bet: Bet; contract: Contract; sale?: Bet }) { ? resolvedPayout(contract, bet) : bet.sale ? bet.sale.amount ?? 0 - : currentValue(contract, bet) + : calculateSaleAmount(contract, bet) )} @@ -347,9 +347,11 @@ function SellButton(props: { contract: Contract; bet: Bet }) { setIsSubmitting(false) }} > -
Sell
+
+ Sell +
- Do you want to sell your {formatMoney(bet.amount)} position on{' '} + Do you want to sell {formatWithCommas(bet.shares)} shares of{' '} for{' '} {formatMoney(calculateSaleAmount(contract, bet))}?