From b9a7a8cdc749cb1d7e2a701b6eff1ddb15cbc25f Mon Sep 17 00:00:00 2001 From: Yannick Goossens Date: Wed, 17 Jul 2024 17:13:21 +0200 Subject: [PATCH] rightUri => rightsUri --- src/context/mintStore.ts | 4 ++-- src/data/ipfs.ts | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/context/mintStore.ts b/src/context/mintStore.ts index 01fa92980..27ff0d48f 100644 --- a/src/context/mintStore.ts +++ b/src/context/mintStore.ts @@ -277,7 +277,7 @@ export const useMintStore = create()( thumbnail: used_thumb, generateDisplayUri: true, rights: license?.value, - rightUri: customLicenseData, + rightsUri: customLicenseData, language: language?.value, accessibility, contentRating, @@ -294,7 +294,7 @@ export const useMintStore = create()( cover: used_cover, thumbnail: used_thumb, rights: license?.value, - rightUri: customLicenseData, + rightsUri: customLicenseData, language: language?.value, accessibility, contentRating, diff --git a/src/data/ipfs.ts b/src/data/ipfs.ts index ae9c04739..1916ed319 100644 --- a/src/data/ipfs.ts +++ b/src/data/ipfs.ts @@ -151,7 +151,7 @@ interface PrepareProps { cover: FileForm thumbnail: FileForm rights: string - rightUri?: string + rightsUri?: string language?: string accessibility: string contentRating: string @@ -167,7 +167,7 @@ export const prepareFile = async ({ cover, thumbnail, rights, - rightUri, + rightsUri, language, accessibility, contentRating, @@ -266,7 +266,7 @@ export const prepareFile = async ({ displayUri, thumbnailUri, rights, - rightUri, + rightsUri, language, accessibility, contentRating, @@ -291,7 +291,7 @@ export const prepareDirectory = async ({ thumbnail, generateDisplayUri, rights, - rightUri, + rightsUri, language, accessibility, contentRating, @@ -306,7 +306,7 @@ export const prepareDirectory = async ({ thumbnail: FileForm generateDisplayUri: string rights: string - rightUri: string + rightsUri: string language: string accessibility: string contentRating: string @@ -388,7 +388,7 @@ export const prepareDirectory = async ({ displayUri, thumbnailUri, rights, - rightUri, + rightsUri, language, accessibility, contentRating, @@ -456,7 +456,7 @@ async function buildMetadataFile({ displayUri = '', thumbnailUri = IPFS_DEFAULT_THUMBNAIL_URI, rights, - rightUri, + rightsUri, language, accessibility, contentRating, @@ -470,7 +470,7 @@ async function buildMetadataFile({ displayUri: string thumbnailUri: string rights: string - rightUri?: string + rightsUri?: string language: string accessibility: string contentRating: string @@ -495,12 +495,12 @@ async function buildMetadataFile({ } if (accessibility) metadata.accessibility = accessibility if (contentRating) metadata.contentRating = contentRating - if (rights === 'custom' && rightUri) { - const rightCid = await uploadFileToIPFSProxy({ - blob: new Blob([Buffer.from(JSON.stringify(rightUri))]), + if (rights === 'custom' && rightsUri) { + const rightsCid = await uploadFileToIPFSProxy({ + blob: new Blob([Buffer.from(JSON.stringify(rightsUri))]), path: 'license.json', }) - metadata.rightUri = `ipfs://${rightCid}` + metadata.rightsUri = `ipfs://${rightsCid}` } if (language != null) metadata.language = language @@ -526,6 +526,6 @@ interface TeiaMetadata { //optional accessibility?: string contentRating?: string - rightUri?: string + rightsUri?: string language?: string }