Skip to content

Commit 59a67a0

Browse files
committed
chore(web): add-dispute-request-params-as-initial-context
1 parent 16e7af5 commit 59a67a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

web/src/hooks/queries/usePopulatedDisputeData.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import { isUndefined } from "utils/index";
1212

1313
import { graphql } from "src/graphql";
1414

15+
import { klerosCoreAddress } from "../contracts/generated";
16+
1517
import { useDisputeDetailsQuery } from "./useDisputeDetailsQuery";
1618

1719
const disputeTemplateQuery = graphql(`
@@ -54,7 +56,10 @@ export const usePopulatedDisputeData = (disputeID?: string, arbitrableAddress?:
5456
const dataMappings = disputeTemplate?.templateDataMappings;
5557

5658
const initialContext = {
57-
disputeID: disputeID,
59+
// Matching the variable name to DisputeRequest
60+
// https://github.com/kleros/kleros-v2/blob/592243f52d57e1540206c06afdbdac0d77311106/contracts/src/arbitration/interfaces/IArbitrableV2.sol#L21
61+
arbitrator: klerosCoreAddress[DEFAULT_CHAIN],
62+
arbitratorDisputeID: disputeID,
5863
arbitrableAddress: arbitrableAddress,
5964
arbitrableChainID: disputeData.dispute?.arbitrableChainId,
6065
graphApiKey: import.meta.env.REACT_APP_GRAPH_API_KEY,

0 commit comments

Comments
 (0)