From b4f8fcf38ed11ab4442d74a2f08c46f960e60c8a Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Thu, 3 Mar 2022 02:10:20 -0800 Subject: [PATCH] Show profit/loss in sale panel --- web/components/bets-list.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 14679a69..8136042f 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -531,6 +531,7 @@ function SellButton(props: { contract: Contract; bet: Bet }) { ) const saleAmount = calculateSaleAmount(contract, bet) + const profit = saleAmount - bet.amount return ( + {profit > 0 ? 'Profit' : 'Loss'}: {formatMoney(profit).replace('-', '')} +
Market probability: {formatPercent(initialProb)} →{' '} {formatPercent(outcomeProb)}