From 61d5352151054d5974b949e9ddb749f2d525d84b Mon Sep 17 00:00:00 2001 From: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com> Date: Mon, 30 Oct 2023 15:02:09 +0100 Subject: [PATCH] fix: ipfs returned an empty string (#485) (#495) --- packages/contracts/deploy/helpers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/contracts/deploy/helpers.ts b/packages/contracts/deploy/helpers.ts index cf9acbcc0..1da2a19b0 100644 --- a/packages/contracts/deploy/helpers.ts +++ b/packages/contracts/deploy/helpers.ts @@ -74,10 +74,10 @@ export async function uploadToIPFS( return 'QmNnobxuyCjtYgsStCPhXKEiQR5cjsc3GtG9ZMTKFTTEFJ'; } - const cid = await client.add(metadata); - await client.pin.add(cid.cid); - console.log(`Uploaded to IPFS with cid ${cid.cid}`); - return cid.path; + const res = await client.add(metadata); + await client.pin.add(res.cid); + console.log(`Uploaded to IPFS with cid ${res.cid.toString()}`); + return res.cid.toString(); } export async function getContractAddress(