Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions web/wagmi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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}`);
}
Expand Down
Loading