Remove invested metric for cfmm markets
This commit is contained in:
parent
624d99fc1d
commit
a9028b0a94
|
@ -306,8 +306,9 @@ export function MyBetsSummary(props: {
|
||||||
className?: string
|
className?: string
|
||||||
}) {
|
}) {
|
||||||
const { bets, contract, className } = props
|
const { bets, contract, className } = props
|
||||||
const { resolution, outcomeType } = contract
|
const { resolution, outcomeType, mechanism } = contract
|
||||||
const isBinary = outcomeType === 'BINARY'
|
const isBinary = outcomeType === 'BINARY'
|
||||||
|
const isCpmm = mechanism === 'cpmm-1'
|
||||||
|
|
||||||
const excludeSales = bets.filter((b) => !b.isSold && !b.sale)
|
const excludeSales = bets.filter((b) => !b.isSold && !b.sale)
|
||||||
const yesWinnings = _.sumBy(excludeSales, (bet) =>
|
const yesWinnings = _.sumBy(excludeSales, (bet) =>
|
||||||
|
@ -324,12 +325,14 @@ export function MyBetsSummary(props: {
|
||||||
return (
|
return (
|
||||||
<Row className={clsx('flex-wrap gap-4 sm:flex-nowrap sm:gap-6', className)}>
|
<Row className={clsx('flex-wrap gap-4 sm:flex-nowrap sm:gap-6', className)}>
|
||||||
<Row className="gap-4 sm:gap-6">
|
<Row className="gap-4 sm:gap-6">
|
||||||
<Col>
|
{!isCpmm && (
|
||||||
<div className="whitespace-nowrap text-sm text-gray-500">
|
<Col>
|
||||||
Invested
|
<div className="whitespace-nowrap text-sm text-gray-500">
|
||||||
</div>
|
Invested
|
||||||
<div className="whitespace-nowrap">{formatMoney(invested)}</div>
|
</div>
|
||||||
</Col>
|
<div className="whitespace-nowrap">{formatMoney(invested)}</div>
|
||||||
|
</Col>
|
||||||
|
)}
|
||||||
{resolution ? (
|
{resolution ? (
|
||||||
<Col>
|
<Col>
|
||||||
<div className="text-sm text-gray-500">Payout</div>
|
<div className="text-sm text-gray-500">Payout</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user