Show better limit order stats in bets table
This commit is contained in:
parent
52d688885d
commit
dd6f5e5ef4
|
@ -668,6 +668,14 @@ function BetRow(props: {
|
||||||
? 'N/A'
|
? 'N/A'
|
||||||
: formatMoney(calculatePayout(contract, bet, bet.outcome))
|
: formatMoney(calculatePayout(contract, bet, bet.outcome))
|
||||||
|
|
||||||
|
const hadPoolMatch =
|
||||||
|
bet.fills?.some((fill) => fill.matchedBetId === null) ?? false
|
||||||
|
|
||||||
|
const ofTotalAmount =
|
||||||
|
bet.limitProb === undefined || bet.orderAmount === undefined
|
||||||
|
? ''
|
||||||
|
: ` / ${formatMoney(bet.orderAmount)}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr>
|
<tr>
|
||||||
<td className="text-neutral">
|
<td className="text-neutral">
|
||||||
|
@ -694,13 +702,22 @@ function BetRow(props: {
|
||||||
{isPseudoNumeric &&
|
{isPseudoNumeric &&
|
||||||
' than ' + formatNumericProbability(bet.probAfter, contract)}
|
' than ' + formatNumericProbability(bet.probAfter, contract)}
|
||||||
</td>
|
</td>
|
||||||
<td>{formatMoney(Math.abs(amount))}</td>
|
<td>
|
||||||
|
{formatMoney(Math.abs(amount))}
|
||||||
|
{ofTotalAmount}
|
||||||
|
</td>
|
||||||
{!isCPMM && !isNumeric && <td>{saleDisplay}</td>}
|
{!isCPMM && !isNumeric && <td>{saleDisplay}</td>}
|
||||||
{!isCPMM && !isResolved && <td>{payoutIfChosenDisplay}</td>}
|
{!isCPMM && !isResolved && <td>{payoutIfChosenDisplay}</td>}
|
||||||
<td>{formatWithCommas(Math.abs(shares))}</td>
|
<td>{formatWithCommas(Math.abs(shares))}</td>
|
||||||
{!isPseudoNumeric && (
|
{!isPseudoNumeric && (
|
||||||
<td>
|
<td>
|
||||||
|
{outcomeType === 'FREE_RESPONSE' || hadPoolMatch ? (
|
||||||
|
<>
|
||||||
{formatPercent(probBefore)} → {formatPercent(probAfter)}
|
{formatPercent(probBefore)} → {formatPercent(probAfter)}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
formatPercent(bet.limitProb ?? 0)
|
||||||
|
)}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
<td>{dayjs(createdTime).format('MMM D, h:mma')}</td>
|
<td>{dayjs(createdTime).format('MMM D, h:mma')}</td>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user