From 8bdc33f683d47a6a4a3fd865c8ebb32ba0ee3d93 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Fri, 10 Jun 2022 15:58:44 -0600 Subject: [PATCH] Revert using bet probs, must make totalShares work --- web/components/feed/feed-answer-comment-group.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/components/feed/feed-answer-comment-group.tsx b/web/components/feed/feed-answer-comment-group.tsx index c3c4289d..e42375d4 100644 --- a/web/components/feed/feed-answer-comment-group.tsx +++ b/web/components/feed/feed-answer-comment-group.tsx @@ -48,11 +48,10 @@ export function FeedAnswerCommentGroup(props: { const commentsList = comments.filter( (comment) => comment.answerOutcome === answer.number.toString() ) - const thisAnswerProb = - bets - .filter((b) => b.outcome === answer.number.toString()) - .sort((a, b) => b.createdTime - a.createdTime)[0]?.probAfter || - getDpmOutcomeProbability(contract.totalShares, answer.id) + const thisAnswerProb = getDpmOutcomeProbability( + contract.totalShares, + answer.id + ) const probPercent = formatPercent(thisAnswerProb) const betsByCurrentUser = (user && betsByUserId[user.id]) ?? [] const commentsByCurrentUser = (user && commentsByUserId[user.id]) ?? []