Skip to content

Commit 7a22cf9

Browse files
committed
latest
1 parent d1cd71d commit 7a22cf9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/data/ipfs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
IPFS_DISPLAY_URI_BLACKCIRCLE,
44
} from '../constants'
55

6-
const createClient = require('ipfs-http-client')
6+
const { create } = require('ipfs-http-client')
77
const Buffer = require('buffer').Buffer
88
const axios = require('axios')
99
const readJsonLines = require('read-json-lines-sync').default
@@ -22,7 +22,7 @@ export const prepareFile = async ({
2222
thumbnail,
2323
generateDisplayUri,
2424
}) => {
25-
const ipfs = createClient(infuraUrl)
25+
const ipfs = create(infuraUrl)
2626

2727
// upload main file
2828
const info = await ipfs.add(buffer)
@@ -72,7 +72,7 @@ export const prepareDirectory = async ({
7272
const cid = `ipfs://${hashes.directory}`
7373

7474
// upload cover image
75-
const ipfs = createClient(infuraUrl)
75+
const ipfs = create(infuraUrl)
7676

7777
let displayUri = ''
7878
if (generateDisplayUri) {
@@ -156,7 +156,7 @@ async function uploadMetadataFile({
156156
displayUri = '',
157157
thumbnailUri = IPFS_DISPLAY_URI_BLACKCIRCLE,
158158
}) {
159-
const ipfs = createClient(infuraUrl)
159+
const ipfs = create(infuraUrl)
160160

161161
return await ipfs.add(
162162
Buffer.from(

0 commit comments

Comments
 (0)