File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,7 @@ With this in hand we can submit the item.
193
193
const gtcr = new ethers.Contract(tcrAddress, _gtcr, signer)
194
194
const enc = new TextEncoder()
195
195
const fileData = enc.encode(JSON.stringify({ columns, values }))
196
- const ipfsEvidenceObject = await ipfsPublish('item.json', fileData)
197
- const ipfsEvidencePath = `/ipfs/${ipfsEvidenceObject[1].hash +
198
- ipfsEvidenceObject[0].path}`
196
+ const ipfsEvidencePath = await ipfsPublish('item.json', fileData)
199
197
200
198
// Request signature and submit.
201
199
const tx = await gtcr.addItem(ipfsEvidencePath, {
@@ -236,8 +234,10 @@ const query = {
236
234
itemID
237
235
status
238
236
data
239
- props {
240
- value
237
+ metadata{
238
+ props {
239
+ value
240
+ }
241
241
}
242
242
requests(first: 1, orderBy: submissionTime, orderDirection: desc) {
243
243
disputed
@@ -264,6 +264,9 @@ const query = {
264
264
const { data, errors } = await (
265
265
await fetch (GTCR_SUBGRAPH_URL , {
266
266
method: ' POST' ,
267
+ headers: {
268
+ ' Content-Type' : " application/json" ,
269
+ },
267
270
body: JSON .stringify (query )
268
271
})
269
272
).json ()
You can’t perform that action at this time.
0 commit comments