From d149c8d432650f6a902f77179bca65b8f6e7117e Mon Sep 17 00:00:00 2001 From: Nikita Yutanov Date: Thu, 22 Feb 2024 14:42:48 +0300 Subject: [PATCH] Fix pinata upload --- frontend/src/features/create-simple-collection/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/create-simple-collection/utils.ts b/frontend/src/features/create-simple-collection/utils.ts index 5715d3a..d4debf7 100644 --- a/frontend/src/features/create-simple-collection/utils.ts +++ b/frontend/src/features/create-simple-collection/utils.ts @@ -16,7 +16,7 @@ const uploadToIpfs = async (file: File) => { const response = await fetch(ADDRESS.IPFS_UPLOAD, { method: 'POST', body: formData }); if (!response.ok) throw new Error(response.statusText); - const { ipfsHash } = await (response.json() as Promise>); + const [{ ipfsHash }] = await (response.json() as Promise[]>); return `ipfs://${ipfsHash}`; };