fix displayed sale amount
This commit is contained in:
parent
3f42991741
commit
a16d35974f
|
@ -292,7 +292,7 @@ export function ContractBetsTable(props: {
|
||||||
<BetRow
|
<BetRow
|
||||||
key={bet.id}
|
key={bet.id}
|
||||||
bet={bet}
|
bet={bet}
|
||||||
sale={salesDict[bet.id]}
|
saleBet={salesDict[bet.id]}
|
||||||
contract={contract}
|
contract={contract}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
@ -302,8 +302,8 @@ export function ContractBetsTable(props: {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function BetRow(props: { bet: Bet; contract: Contract; sale?: Bet }) {
|
function BetRow(props: { bet: Bet; contract: Contract; saleBet?: Bet }) {
|
||||||
const { bet, sale, contract } = props
|
const { bet, saleBet, contract } = props
|
||||||
const {
|
const {
|
||||||
amount,
|
amount,
|
||||||
outcome,
|
outcome,
|
||||||
|
@ -328,8 +328,8 @@ function BetRow(props: { bet: Bet; contract: Contract; sale?: Bet }) {
|
||||||
</td>
|
</td>
|
||||||
<td>{formatWithCommas(shares)}</td>
|
<td>{formatWithCommas(shares)}</td>
|
||||||
<td>
|
<td>
|
||||||
{sale ? (
|
{saleBet?.sale ? (
|
||||||
<>{formatMoney(Math.abs(sale.amount))} (sold)</>
|
<>{formatMoney(Math.abs(saleBet.sale.amount))} (sold)</>
|
||||||
) : (
|
) : (
|
||||||
formatMoney(
|
formatMoney(
|
||||||
isResolved
|
isResolved
|
||||||
|
|
Loading…
Reference in New Issue
Block a user