Skip to content

Commit 8404104

Browse files
committed
feat: add externaldisputeid as context to the dispute too
1 parent 1c7a363 commit 8404104

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web/src/hooks/queries/usePopulatedDisputeData.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { populateTemplate } from "@kleros/kleros-sdk/src/dataMappings/utils/popu
99
import { GENESIS_BLOCK_ARBSEPOLIA } from "consts/index";
1010
import { useGraphqlBatcher } from "context/GraphqlBatcher";
1111
import { iArbitrableV2Abi } from "hooks/contracts/generated";
12+
import { useEvidenceGroup } from "queries/useEvidenceGroup";
1213
import { debounceErrorToast } from "utils/debounceErrorToast";
1314
import { 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 externalDisputeID = useEvidenceGroup(disputeID, arbitrableAddress);
3537

3638
return useQuery<DisputeDetails>({
3739
queryKey: [`DisputeTemplate${disputeID}${arbitrableAddress}`],
@@ -60,6 +62,7 @@ export const usePopulatedDisputeData = (disputeID?: string, arbitrableAddress?:
6062
disputeID: disputeID,
6163
arbitrable: arbitrableAddress,
6264
graphApiKey: process.env.GRAPH_API_KEY,
65+
externalDisputeID: externalDisputeID,
6366
};
6467

6568
const data = dataMappings ? await executeActions(JSON.parse(dataMappings), initialContext) : {};

0 commit comments

Comments
 (0)