File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 33 IPFS_DISPLAY_URI_BLACKCIRCLE ,
44} from '../constants'
55
6- const createClient = require ( 'ipfs-http-client' )
6+ const { create } = require ( 'ipfs-http-client' )
77const Buffer = require ( 'buffer' ) . Buffer
88const axios = require ( 'axios' )
99const 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 (
You can’t perform that action at this time.
0 commit comments