From a37ab956dbde8d5658a7cd668970acd1612c3b9a Mon Sep 17 00:00:00 2001 From: James Grugett Date: Mon, 21 Mar 2022 19:48:48 -0500 Subject: [PATCH] Hide answers in graph if M$ 0 is bet on it --- web/components/answers/answers-graph.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/components/answers/answers-graph.tsx b/web/components/answers/answers-graph.tsx index f5d97d04..a602a826 100644 --- a/web/components/answers/answers-graph.tsx +++ b/web/components/answers/answers-graph.tsx @@ -137,12 +137,14 @@ const computeProbsByOutcome = ( bets: Bet[], contract: FullContract ) => { + const { totalBets } = contract + const betsByOutcome = _.groupBy(bets, (bet) => bet.outcome) const outcomes = Object.keys(betsByOutcome).filter((outcome) => { const maxProb = Math.max( ...betsByOutcome[outcome].map((bet) => bet.probAfter) ) - return outcome !== '0' && maxProb > 0.05 + return outcome !== '0' && maxProb > 0.02 && totalBets[outcome] > 0.000000001 }) const trackedOutcomes = _.sortBy(