Skip to content

Commit

Permalink
fix: ipfs returned an empty string (#485) (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
heueristik authored Oct 30, 2023
1 parent 2a02e0b commit 61d5352
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/contracts/deploy/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 61d5352

Please sign in to comment.