From 8b6e1f9c662cf285aa2ac0f75c5bbf375a048f9e Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Tue, 9 Sep 2025 00:20:12 +0530 Subject: [PATCH 1/3] fix(web): invalid-dispute-vote-reveal --- web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx b/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx index 432f07e2a..5173f7dda 100644 --- a/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx +++ b/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx @@ -149,6 +149,11 @@ const getSaltAndChoice = async ( if (isUndefined(rawSalt)) return; const salt = keccak256(rawSalt); + // when dispute is invalid, just add RFA to the answers array + if (answers.length === 0) { + answers.unshift({ id: "0x0", title: "Refuse To Arbitrate", description: "Refuse To Arbitrate" }); + } + const { choice } = answers.reduce<{ found: boolean; choice: bigint }>( (acc, answer) => { if (acc.found) return acc; From 7a78b275e752179f82b6da3679b76a9ab5cf69e3 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Tue, 9 Sep 2025 00:30:01 +0530 Subject: [PATCH 2/3] chore: rabbit-feedback --- .../pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx b/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx index 5173f7dda..3bea21339 100644 --- a/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx +++ b/web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx @@ -150,11 +150,12 @@ const getSaltAndChoice = async ( const salt = keccak256(rawSalt); // when dispute is invalid, just add RFA to the answers array - if (answers.length === 0) { - answers.unshift({ id: "0x0", title: "Refuse To Arbitrate", description: "Refuse To Arbitrate" }); - } + const candidates = + answers?.length > 0 + ? answers + : [{ id: "0x0", title: "Refuse To Arbitrate", description: "Refuse To Arbitrate" } as Answer]; - const { choice } = answers.reduce<{ found: boolean; choice: bigint }>( + 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)])); From 6bea07295faed622e887f1822094a564f305b0d0 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Tue, 9 Sep 2025 17:28:22 +0530 Subject: [PATCH 3/3] fix(web): neo-codegen --- web/wagmi.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}`); }