From 135160dd924741cc4a680a777ec7727f64cf24e2 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Fri, 22 Jul 2022 16:18:36 -0500 Subject: [PATCH] Remove custom placeholders. Just show '0' for limit inputs --- web/components/bet-panel.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index db021382..987a394e 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -372,15 +372,6 @@ function LimitOrderPanel(props: { (highLimitProb !== undefined && (highLimitProb <= 0 || highLimitProb >= 100)) - const initialLow = initialProb * 0.85 - const initialHigh = initialProb + (1 - initialProb) * 0.15 - const lowPlaceholder = Math.floor( - isPseudoNumeric ? getMappedValue(contract)(initialLow) : initialLow * 100 - ).toString() - const highPlaceholder = Math.ceil( - isPseudoNumeric ? getMappedValue(contract)(initialHigh) : initialHigh * 100 - ).toString() - const hasYesLimitBet = lowLimitProb !== undefined && !!betAmount const hasNoLimitBet = highLimitProb !== undefined && !!betAmount const hasTwoBets = hasYesLimitBet && hasNoLimitBet @@ -499,7 +490,7 @@ function LimitOrderPanel(props: { 'YES', yesAmount, contract, - Math.min(yesLimitProb ?? initialLow, 0.999), + Math.min(yesLimitProb ?? initialProb, 0.999), unfilledBets as LimitBet[] ) const yesReturnPercent = formatPercent(yesReturn) @@ -513,7 +504,7 @@ function LimitOrderPanel(props: { 'NO', noAmount, contract, - Math.max(noLimitProb ?? initialHigh, 0.01), + Math.max(noLimitProb ?? initialProb, 0.01), unfilledBets as LimitBet[] ) const noReturnPercent = formatPercent(noReturn) @@ -530,7 +521,6 @@ function LimitOrderPanel(props: { prob={lowLimitProb} setProb={setLowLimitProb} isSubmitting={isSubmitting} - placeholder={lowPlaceholder} /> @@ -542,7 +532,6 @@ function LimitOrderPanel(props: { prob={highLimitProb} setProb={setHighLimitProb} isSubmitting={isSubmitting} - placeholder={highPlaceholder} />