Skip to content

Commit c6b51c1

Browse files
committed
fix(web): jurors-count-input-crash
1 parent c6562bb commit c6b51c1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

web/src/pages/Cases/CaseDetails/Voting/Shutter/Commit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const Commit: React.FC<ICommit> = ({
100100
const encodedMessage = `${choice.toString()}${SEPARATOR}${salt}${SEPARATOR}${justification}`;
101101
/* an extra 300 seconds (5 minutes) of decryptionDelay is enforced after Commit period is over
102102
to avoid premature decryption and voting attacks if no one passes the Commit period quickly */
103-
const decryptionDelay = countdownToVotingPeriod ?? 0 + 300;
103+
const decryptionDelay = (countdownToVotingPeriod ?? 0) + 300;
104104
const { encryptedCommitment, identity } = await encrypt(encodedMessage, decryptionDelay);
105105

106106
const commitHash = hashVote(choice, BigInt(salt), justification);

web/src/pages/Resolver/Parameters/Jurors.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import { DisplaySmall, Field } from "@kleros/ui-components-library";
55

66
import ETH from "svgs/icons/eth.svg";
77

8-
import { REFETCH_INTERVAL } from "consts/index";
98
import { DEFAULT_CHAIN } from "consts/chains";
9+
import { REFETCH_INTERVAL } from "consts/index";
1010
import { useNewDisputeContext } from "context/NewDisputeContext";
1111
import { useReadKlerosCoreArbitrationCost } from "hooks/contracts/generated";
1212
import { formatETH } from "utils/format";
1313
import { isUndefined } from "utils/index";
1414
import { prepareArbitratorExtradata } from "utils/prepareArbitratorExtradata";
1515

16-
import { responsiveSize } from "styles/responsiveSize";
1716
import { landscapeStyle } from "styles/landscapeStyle";
17+
import { responsiveSize } from "styles/responsiveSize";
1818

1919
import Header from "pages/Resolver/Header";
2020

@@ -58,7 +58,7 @@ const Jurors: React.FC = () => {
5858
enabled: !isUndefined(disputeData.numberOfJurors) && !Number.isNaN(disputeData.numberOfJurors),
5959
refetchInterval: REFETCH_INTERVAL,
6060
},
61-
args: [prepareArbitratorExtradata(disputeData.courtId ?? "", disputeData.numberOfJurors ?? "")],
61+
args: [prepareArbitratorExtradata(disputeData.courtId ?? "", disputeData.numberOfJurors ?? "0")],
6262
chainId: DEFAULT_CHAIN,
6363
});
6464

0 commit comments

Comments
 (0)