Skip to content

Commit 8c2903e

Browse files
committed
fix(subgraph): get the disputekit id from the round instead of hardcoding it to 1
1 parent 061b22a commit 8c2903e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

subgraph/core/schema.graphql

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ type User @entity {
8080
totalResolvedDisputes: BigInt!
8181
totalDisputes: BigInt!
8282
totalAppealingDisputes: BigInt!
83+
totalCoherentVotes: BigInt!
84+
totalResolvedVotes: BigInt!
85+
coherenceScore: BigInt!
8386
votes: [Vote!]! @derivedFrom(field: "juror")
8487
contributions: [Contribution!]! @derivedFrom(field: "contributor")
8588
evidences: [Evidence!]! @derivedFrom(field: "sender")
8689
penalties: [Penalty!]! @derivedFrom(field: "juror")
87-
totalCoherentVotes: BigInt!
88-
totalResolvedVotes: BigInt!
89-
coherenceScore: BigInt!
9090
}
9191

9292
type Penalty @entity {

subgraph/core/src/KlerosCore.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ export function handleNewPeriod(event: NewPeriod): void {
137137
const draw = Draw.load(draws[j].id);
138138
if (!draw) continue;
139139

140-
// This will only work for Classic DisputeKit ("1-").
141-
const vote = ClassicVote.load(`1-${draw.id}`);
140+
// Since this is a ClassicVote entity, this will only work for the Classic DisputeKit (which has ID "1").
141+
const vote = ClassicVote.load(`${round.disputeKit}-${draw.id}`);
142142

143143
if (!vote) continue;
144144

0 commit comments

Comments
 (0)