Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,13 @@ const getSaltAndChoice = async (
if (isUndefined(rawSalt)) return;
const salt = keccak256(rawSalt);

const { choice } = answers.reduce<{ found: boolean; choice: bigint }>(
// when dispute is invalid, just add RFA to the answers array
const candidates =
answers?.length > 0
? answers
: [{ id: "0x0", title: "Refuse To Arbitrate", description: "Refuse To Arbitrate" } as Answer];

const { choice } = candidates.reduce<{ found: boolean; choice: bigint }>(
(acc, answer) => {
if (acc.found) return acc;
const innerCommit = keccak256(encodePacked(["uint256", "uint256"], [BigInt(answer.id), BigInt(salt)]));
Expand Down
Loading