diff --git a/web/components/bet-summary.tsx b/web/components/bet-summary.tsx index 7460c83d..aa64da43 100644 --- a/web/components/bet-summary.tsx +++ b/web/components/bet-summary.tsx @@ -38,6 +38,8 @@ export function BetsSummary(props: { calculatePayout(contract, bet, 'NO') ) + const position = yesWinnings - noWinnings + const prob = isBinary ? getProbability(contract) : 0 const expectation = prob * yesWinnings + (1 - prob) * noWinnings @@ -61,14 +63,16 @@ export function BetsSummary(props: {
- {yesWinnings > 0 ? ( + {position > 1e-7 ? ( <> - {formatWithCommas(yesWinnings)} + {formatWithCommas(position)} + + ) : position < -1e-7 ? ( + <> + {formatWithCommas(-position)} ) : ( - <> - {formatWithCommas(noWinnings)} - + '——' )}
@@ -90,7 +94,7 @@ export function BetsSummary(props: {
{formatMoney(invested)}
- {isBinary && ( + {isBinary && !resolution && (
Expectation{' '} @@ -103,7 +107,7 @@ export function BetsSummary(props: {
Profit{' '} - +
{formatMoney(profit)} @@ -111,7 +115,6 @@ export function BetsSummary(props: {
- ) }