diff --git a/web/components/bet-summary.tsx b/web/components/bet-summary.tsx index aa64da43..4dc39823 100644 --- a/web/components/bet-summary.tsx +++ b/web/components/bet-summary.tsx @@ -25,10 +25,8 @@ export function BetsSummary(props: { const isBinary = outcomeType === 'BINARY' const bets = props.userBets.filter((b) => !b.isAnte) - const { profitPercent, payout, profit, invested } = getContractBetMetrics( - contract, - bets - ) + const { profitPercent, payout, profit, invested, hasShares } = + getContractBetMetrics(contract, bets) const excludeSales = bets.filter((b) => !b.isSold && !b.sale) const yesWinnings = sumBy(excludeSales, (bet) => @@ -39,6 +37,7 @@ export function BetsSummary(props: { ) const position = yesWinnings - noWinnings + const outcome = hasShares ? (position > 0 ? 'YES' : 'NO') : undefined const prob = isBinary ? getProbability(contract) : 0 const expectation = prob * yesWinnings + (1 - prob) * noWinnings @@ -60,7 +59,9 @@ export function BetsSummary(props: {
Position{' '} - +
{position > 1e-7 ? (