diff --git a/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx b/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx index 432f07e2a..3bea21339 100644 --- a/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx +++ b/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx @@ -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)])); diff --git a/web/wagmi.config.ts b/web/wagmi.config.ts index 893df2554..f3b21dd0d 100644 --- a/web/wagmi.config.ts +++ b/web/wagmi.config.ts @@ -18,7 +18,7 @@ dotenv.config(); const readArtifacts = async (type: ArbitratorTypes, viemChainName: string, hardhatChainName?: string) => { const artifactSuffix = - type === ArbitratorTypes.vanilla + type === ArbitratorTypes.vanilla || type === ArbitratorTypes.neo ? "" : ArbitratorTypes[type].toString().charAt(0).toUpperCase() + ArbitratorTypes[type].toString().slice(1); const vanillaArtifacts = [ @@ -59,7 +59,7 @@ const readArtifacts = async (type: ArbitratorTypes, viemChainName: string, hardh // console.debug(`Skipping ${name} for deployment type ${ArbitratorTypes[type]}`); continue; } - if (type !== ArbitratorTypes.vanilla) { + if (type === ArbitratorTypes.university) { nameWithoutSuffix = name.slice(0, -artifactSuffix.length); // console.debug(`Using ${nameWithoutSuffix} instead of ${name}`); }