@@ -9,6 +9,7 @@ import { populateTemplate } from "@kleros/kleros-sdk/src/dataMappings/utils/popu
9
9
import { GENESIS_BLOCK_ARBSEPOLIA } from "consts/index" ;
10
10
import { useGraphqlBatcher } from "context/GraphqlBatcher" ;
11
11
import { iArbitrableV2Abi } from "hooks/contracts/generated" ;
12
+ import { useEvidenceGroup } from "queries/useEvidenceGroup" ;
12
13
import { debounceErrorToast } from "utils/debounceErrorToast" ;
13
14
import { isUndefined } from "utils/index" ;
14
15
@@ -32,6 +33,7 @@ export const usePopulatedDisputeData = (disputeID?: string, arbitrableAddress?:
32
33
const { data : crossChainData , isError } = useIsCrossChainDispute ( disputeID , arbitrableAddress ) ;
33
34
const isEnabled = ! isUndefined ( disputeID ) && ! isUndefined ( crossChainData ) && ! isUndefined ( arbitrableAddress ) ;
34
35
const { graphqlBatcher } = useGraphqlBatcher ( ) ;
36
+ const { data : externalDisputeID } = useEvidenceGroup ( disputeID , arbitrableAddress ) ;
35
37
36
38
return useQuery < DisputeDetails > ( {
37
39
queryKey : [ `DisputeTemplate${ disputeID } ${ arbitrableAddress } ` ] ,
@@ -59,6 +61,8 @@ export const usePopulatedDisputeData = (disputeID?: string, arbitrableAddress?:
59
61
const initialContext = {
60
62
disputeID : disputeID ,
61
63
arbitrable : arbitrableAddress ,
64
+ graphApiKey : import . meta. env . REACT_APP_GRAPH_API_KEY ,
65
+ externalDisputeID : externalDisputeID ,
62
66
} ;
63
67
64
68
const data = dataMappings ? await executeActions ( JSON . parse ( dataMappings ) , initialContext ) : { } ;
0 commit comments