From 8fe9f23d913334c7fd66395eebfc7616e55e45c7 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 22 Feb 2022 14:12:49 -0600 Subject: [PATCH] Fix hiding answers where all bets sold --- web/components/answers/answers-panel.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/components/answers/answers-panel.tsx b/web/components/answers/answers-panel.tsx index 96a3270e..5fc30595 100644 --- a/web/components/answers/answers-panel.tsx +++ b/web/components/answers/answers-panel.tsx @@ -15,11 +15,13 @@ import { AnswerResolvePanel } from './answer-resolve-panel' export function AnswersPanel(props: { contract: Contract; answers: Answer[] }) { const { contract } = props - const { creatorId, resolution, resolutions, pool } = contract + const { creatorId, resolution, resolutions, totalBets } = contract const answers = useAnswers(contract.id) ?? props.answers const [winningAnswers, otherAnswers] = _.partition( - answers.filter((answer) => answer.id !== '0' && pool[answer.id] > 0), + answers.filter( + (answer) => answer.id !== '0' && totalBets[answer.id] > 0.000000001 + ), (answer) => answer.id === resolution || (resolutions && resolutions[answer.id]) )