From 5385d204d37e723440490ce7155ef5fce4ca682c Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 23 Oct 2024 14:34:35 -0300 Subject: [PATCH] fix: show appeal period for loosing side --- src/app/[pohid]/[chain]/[request]/Appeal.tsx | 50 ++++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/src/app/[pohid]/[chain]/[request]/Appeal.tsx b/src/app/[pohid]/[chain]/[request]/Appeal.tsx index ade60c1..0b5203d 100644 --- a/src/app/[pohid]/[chain]/[request]/Appeal.tsx +++ b/src/app/[pohid]/[chain]/[request]/Appeal.tsx @@ -32,6 +32,7 @@ interface SideFundingProps { requesterFunds: bigint; appealCost: bigint; chainId: SupportedChainId; + loosingSideHasEnd: boolean; } const SideFunding: React.FC = ({ @@ -43,6 +44,7 @@ const SideFunding: React.FC = ({ requesterFunds, appealCost, chainId, + loosingSideHasEnd, }) => { const title = side === SideEnum.claimer ? "Claimer" : "Challenger"; const [requesterInput, setRequesterInput] = useState(0n); @@ -92,11 +94,11 @@ const SideFunding: React.FC = ({ /> } @@ -292,6 +305,23 @@ const Appeal: React.FC = ({ in order not to lose the case.


+

Appeal timeframes

+

+ Appeal timeframe ends  + +

+ {loosingSideHasEnd ? ( +

+ Loosing side ended  + +

+ ) : ( +

+ Loosing side ends  + +

+ )} +
= ({ requesterFunds={claimerFunds} appealCost={totalClaimerCost} chainId={chainId} + loosingSideHasEnd={ + currentRulingFormatted === SideEnum.challenger + ? loosingSideHasEnd + : false + } />
= ({ requesterFunds={challengerFunds} appealCost={totalChallengerCost} chainId={chainId} + loosingSideHasEnd={ + currentRulingFormatted === SideEnum.claimer + ? loosingSideHasEnd + : false + } />