diff --git a/web/components/answers/answer-bet-panel.tsx b/web/components/answers/answer-bet-panel.tsx index 6dcba79b..238c7783 100644 --- a/web/components/answers/answer-bet-panel.tsx +++ b/web/components/answers/answer-bet-panel.tsx @@ -26,6 +26,7 @@ import { Bet } from 'common/bet' import { track } from 'web/lib/service/analytics' import { SignUpPrompt } from '../sign-up-prompt' import { isIOS } from 'web/lib/util/device' +import { AlertBox } from '../alert-box' export function AnswerBetPanel(props: { answer: Answer @@ -113,6 +114,8 @@ export function AnswerBetPanel(props: { const currentReturn = betAmount ? (currentPayout - betAmount) / betAmount : 0 const currentReturnPercent = formatPercent(currentReturn) + const bankrollFraction = (betAmount ?? 0) / (user?.balance ?? 1e9) + return ( @@ -139,6 +142,22 @@ export function AnswerBetPanel(props: { disabled={isSubmitting} inputRef={inputRef} /> + + {(betAmount ?? 0) > 10 && + bankrollFraction >= 0.5 && + bankrollFraction <= 1 ? ( + + ) : ( + '' + )} +
Probability
diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 9c572e0c..d5f88d43 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -254,6 +254,7 @@ function BuyPanel(props: { const resultProb = getCpmmProbability(newPool, newP) const probStayedSame = formatPercent(resultProb) === formatPercent(initialProb) + const probChange = Math.abs(resultProb - initialProb) const currentPayout = newBet.shares @@ -305,6 +306,19 @@ function BuyPanel(props: { '' )} + {(betAmount ?? 0) > 10 && probChange >= 0.3 ? ( + + ) : ( + '' + )} +