Revert using bet probs, must make totalShares work

This commit is contained in:
Ian Philips 2022-06-10 15:58:44 -06:00
parent 9cccc08021
commit 8bdc33f683

View File

@ -48,11 +48,10 @@ export function FeedAnswerCommentGroup(props: {
const commentsList = comments.filter( const commentsList = comments.filter(
(comment) => comment.answerOutcome === answer.number.toString() (comment) => comment.answerOutcome === answer.number.toString()
) )
const thisAnswerProb = const thisAnswerProb = getDpmOutcomeProbability(
bets contract.totalShares,
.filter((b) => b.outcome === answer.number.toString()) answer.id
.sort((a, b) => b.createdTime - a.createdTime)[0]?.probAfter || )
getDpmOutcomeProbability(contract.totalShares, answer.id)
const probPercent = formatPercent(thisAnswerProb) const probPercent = formatPercent(thisAnswerProb)
const betsByCurrentUser = (user && betsByUserId[user.id]) ?? [] const betsByCurrentUser = (user && betsByUserId[user.id]) ?? []
const commentsByCurrentUser = (user && commentsByUserId[user.id]) ?? [] const commentsByCurrentUser = (user && commentsByUserId[user.id]) ?? []