diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 8716934c..02242239 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -38,14 +38,7 @@ export function BetPanel(props: { contract: Contract; className?: string }) { const amount = parseInt(str) - if ( - (str && isNaN(amount)) || - // Don't update to amount that is rendered in exponential notation. - // e.g. '1e21' - amount.toString().includes('e') - ) { - return - } + if (str && isNaN(amount)) return setBetAmount(str ? amount : undefined) @@ -68,7 +61,7 @@ export function BetPanel(props: { contract: Contract; className?: string }) { amount: betAmount, outcome: betChoice, contractId: contract.id, - }).then(r => r.data as any) + }).then((r) => r.data as any) console.log('placed bet. Result:', result) @@ -111,7 +104,7 @@ export function BetPanel(props: { contract: Contract; className?: string }) {
Outcome
onBetChoice(choice)} /> @@ -149,7 +142,7 @@ export function BetPanel(props: { contract: Contract; className?: string }) {
{formatPercent(resultProb)}
-
Estimated winnings
+
Max payout (estimated)
{formatMoney(estimatedWinnings)}   (+{estimatedReturnPercent})
@@ -162,8 +155,8 @@ export function BetPanel(props: { contract: Contract; className?: string }) { betDisabled ? 'btn-disabled' : betChoice === 'YES' - ? 'btn-primary' - : 'bg-red-400 hover:bg-red-500 border-none', + ? 'btn-primary' + : 'bg-red-400 hover:bg-red-500 border-none', isSubmitting ? 'loading' : '' )} onClick={betDisabled ? undefined : submitBet} diff --git a/web/components/yes-no-selector.tsx b/web/components/yes-no-selector.tsx index c4274766..92049e3e 100644 --- a/web/components/yes-no-selector.tsx +++ b/web/components/yes-no-selector.tsx @@ -79,7 +79,7 @@ function Button(props: {