@@ -9,6 +9,7 @@ import { populateTemplate } from "@kleros/kleros-sdk/src/dataMappings/utils/popu
99import { GENESIS_BLOCK_ARBSEPOLIA } from "consts/index" ;
1010import { useGraphqlBatcher } from "context/GraphqlBatcher" ;
1111import { iArbitrableV2Abi } from "hooks/contracts/generated" ;
12+ import { useEvidenceGroup } from "queries/useEvidenceGroup" ;
1213import { debounceErrorToast } from "utils/debounceErrorToast" ;
1314import { isUndefined } from "utils/index" ;
1415
@@ -32,6 +33,7 @@ export const usePopulatedDisputeData = (disputeID?: string, arbitrableAddress?:
3233 const { data : crossChainData , isError } = useIsCrossChainDispute ( disputeID , arbitrableAddress ) ;
3334 const isEnabled = ! isUndefined ( disputeID ) && ! isUndefined ( crossChainData ) && ! isUndefined ( arbitrableAddress ) ;
3435 const { graphqlBatcher } = useGraphqlBatcher ( ) ;
36+ const { data : externalDisputeID } = useEvidenceGroup ( disputeID , arbitrableAddress ) ;
3537
3638 return useQuery < DisputeDetails > ( {
3739 queryKey : [ `DisputeTemplate${ disputeID } ${ arbitrableAddress } ` ] ,
@@ -59,6 +61,8 @@ export const usePopulatedDisputeData = (disputeID?: string, arbitrableAddress?:
5961 const initialContext = {
6062 disputeID : disputeID ,
6163 arbitrable : arbitrableAddress ,
64+ graphApiKey : import . meta. env . REACT_APP_GRAPH_API_KEY ,
65+ externalDisputeID : externalDisputeID ,
6266 } ;
6367
6468 const data = dataMappings ? await executeActions ( JSON . parse ( dataMappings ) , initialContext ) : { } ;
0 commit comments