Skip to content

Commit 978e954

Browse files
committed
fix(web): appeal-tab-not-displaying-options
1 parent 0ff85f8 commit 978e954

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

web/src/hooks/useClassicAppealContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const getCurrentLocalRound = (dispute?: ClassicAppealQuery["dispute"]) => {
102102
if (!dispute) return undefined;
103103

104104
const period = dispute.period;
105-
const currentLocalRoundIndex = dispute.disputeKitDispute?.currentLocalRoundIndex;
105+
const currentLocalRoundIndex = dispute.disputeKitDispute[0]?.currentLocalRoundIndex;
106106
const adjustedRoundIndex = ["appeal", "execution"].includes(period)
107107
? currentLocalRoundIndex
108108
: currentLocalRoundIndex - 1;

web/src/pages/Cases/CaseDetails/Appeal/Classic/Options/StageOne.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
useOptionsContext,
99
useSelectedOptionContext,
1010
} from "hooks/useClassicAppealContext";
11+
import { isUndefined } from "utils/index";
1112
import { formatUnitsWei } from "utils/format";
1213

1314
const Container = styled.div`
@@ -30,14 +31,15 @@ const StageOne: React.FC<IStageOne> = ({ setAmount }) => {
3031
const options = useOptionsContext();
3132
const loserSideCountdown = useLoserSideCountdownContext();
3233
const { selectedOption, setSelectedOption } = useSelectedOptionContext();
34+
3335
return (
3436
<Container>
3537
<StageExplainer {...{ loserSideCountdown }} />
3638
<label> Which option do you want to fund? </label>
3739
<OptionsContainer>
38-
{typeof paidFees !== "undefined" &&
39-
typeof winnerRequiredFunding !== "undefined" &&
40-
typeof loserRequiredFunding !== "undefined" &&
40+
{!isUndefined(paidFees) &&
41+
!isUndefined(winnerRequiredFunding) &&
42+
!isUndefined(loserRequiredFunding) &&
4143
options?.map((answer: string, i: number) => {
4244
const requiredFunding = i.toString() === winningChoice ? winnerRequiredFunding : loserRequiredFunding;
4345
return (

0 commit comments

Comments
 (0)