From a16d35974f354aad01c8a3ab5b051b5af4de3e3c Mon Sep 17 00:00:00 2001 From: mantikoros Date: Sat, 15 Jan 2022 16:51:09 -0600 Subject: [PATCH] fix displayed sale amount --- web/components/bets-list.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 1ca7b38a..c375e167 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -292,7 +292,7 @@ export function ContractBetsTable(props: { ))} @@ -302,8 +302,8 @@ export function ContractBetsTable(props: { ) } -function BetRow(props: { bet: Bet; contract: Contract; sale?: Bet }) { - const { bet, sale, contract } = props +function BetRow(props: { bet: Bet; contract: Contract; saleBet?: Bet }) { + const { bet, saleBet, contract } = props const { amount, outcome, @@ -328,8 +328,8 @@ function BetRow(props: { bet: Bet; contract: Contract; sale?: Bet }) { {formatWithCommas(shares)} - {sale ? ( - <>{formatMoney(Math.abs(sale.amount))} (sold) + {saleBet?.sale ? ( + <>{formatMoney(Math.abs(saleBet.sale.amount))} (sold) ) : ( formatMoney( isResolved