From 1b3b4eb6d872a4240957ebe0f1ef2ea0f2d68686 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 21 Jun 2022 09:59:12 -0500 Subject: [PATCH] Don't show sell button for closed markets --- web/components/bets-list.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 906f3af5..95fa6e21 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -367,9 +367,10 @@ export function BetsSummary(props: { className?: string }) { const { contract, isYourBets, className } = props - const { resolution, outcomeType, mechanism } = contract + const { resolution, closeTime, outcomeType, mechanism } = contract const isBinary = outcomeType === 'BINARY' const isCpmm = mechanism === 'cpmm-1' + const isClosed = closeTime && Date.now() > closeTime const bets = props.bets.filter((b) => !b.isAnte) @@ -445,6 +446,7 @@ export function BetsSummary(props: { {isYourBets && isCpmm && isBinary && + !isClosed && !resolution && invested > 0 && user && (