From be90a585a8ae0b419692d880a551ed434a96ca89 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Wed, 15 Dec 2021 17:55:46 -0600 Subject: [PATCH] bet panel: small things --- web/components/bet-panel.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index d6ce9c6a..8716934c 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -98,6 +98,8 @@ export function BetPanel(props: { contract: Contract; className?: string }) { : 0 const estimatedReturnPercent = (estimatedReturn * 100).toFixed() + '%' + const remainingBalance = (user?.balance || 0) - (betAmount || 0) + return ( onBetChange(e.target.value)} /> {error && ( -
+
{error}
)}
Remaining balance
-
{formatMoney((user?.balance || 0) - (betAmount || 0))}
+
{formatMoney(remainingBalance > 0 ? remainingBalance : 0)}
Implied chance