From 24fac1fc0b65c58b134230a2fcfe0c608c84c710 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Mon, 11 Jul 2022 15:53:11 -0500 Subject: [PATCH] Fix erronous 0 prob shown in table --- web/components/bets-list.tsx | 4 +++- web/components/feed/feed-bets.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 8a461658..158d14de 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -669,7 +669,9 @@ function BetRow(props: { : formatMoney(calculatePayout(contract, bet, bet.outcome)) const hadPoolMatch = - bet.fills?.some((fill) => fill.matchedBetId === null) ?? false + (bet.limitProb === undefined || + bet.fills?.some((fill) => fill.matchedBetId === null)) ?? + false const ofTotalAmount = bet.limitProb === undefined || bet.orderAmount === undefined diff --git a/web/components/feed/feed-bets.tsx b/web/components/feed/feed-bets.tsx index 83656f8e..1520e57c 100644 --- a/web/components/feed/feed-bets.tsx +++ b/web/components/feed/feed-bets.tsx @@ -89,7 +89,9 @@ export function BetStatusText(props: { const money = formatMoney(Math.abs(amount)) const hadPoolMatch = - bet.fills?.some((fill) => fill.matchedBetId === null) ?? false + (bet.limitProb === undefined || + bet.fills?.some((fill) => fill.matchedBetId === null)) ?? + false return (