Don't show sell button for closed markets

This commit is contained in:
James Grugett 2022-06-21 09:59:12 -05:00
parent 5add7eea49
commit 1b3b4eb6d8

View File

@ -367,9 +367,10 @@ export function BetsSummary(props: {
className?: string className?: string
}) { }) {
const { contract, isYourBets, className } = props const { contract, isYourBets, className } = props
const { resolution, outcomeType, mechanism } = contract const { resolution, closeTime, outcomeType, mechanism } = contract
const isBinary = outcomeType === 'BINARY' const isBinary = outcomeType === 'BINARY'
const isCpmm = mechanism === 'cpmm-1' const isCpmm = mechanism === 'cpmm-1'
const isClosed = closeTime && Date.now() > closeTime
const bets = props.bets.filter((b) => !b.isAnte) const bets = props.bets.filter((b) => !b.isAnte)
@ -445,6 +446,7 @@ export function BetsSummary(props: {
{isYourBets && {isYourBets &&
isCpmm && isCpmm &&
isBinary && isBinary &&
!isClosed &&
!resolution && !resolution &&
invested > 0 && invested > 0 &&
user && ( user && (