From b28bc58479bbbb48fb9bc4287c8d2cac797d8f3e Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Thu, 30 May 2024 09:04:21 +0530 Subject: [PATCH] fix: add-headers-to-subgraph-fetch-query --- src/standards/Arbitrable.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/standards/Arbitrable.js b/src/standards/Arbitrable.js index e48f591..e64058b 100644 --- a/src/standards/Arbitrable.js +++ b/src/standards/Arbitrable.js @@ -176,8 +176,11 @@ class Arbitrable extends StandardContract { } }`, }; - const dispute = (await (await fetch(subgraph, { method: "POST", body: JSON.stringify(query) })).json())?.data - ?.disputes; + const dispute = (await (await fetch(subgraph, { method: "POST", + body: JSON.stringify(query), + headers: { + 'Content-Type': 'application/json', + }, })).json())?.data?.disputes; return ( await Promise.allSettled( dispute[0]?.evidenceGroup?.evidence.map(async (evidence) => {