Skip to content

Commit

Permalink
Fix pinata upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov committed Feb 22, 2024
1 parent d2c7958 commit d149c8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/features/create-simple-collection/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Record<'ipfsHash', string>>);
const [{ ipfsHash }] = await (response.json() as Promise<Record<'ipfsHash', string>[]>);
return `ipfs://${ipfsHash}`;
};

Expand Down

0 comments on commit d149c8d

Please sign in to comment.