Skip to content

Commit

Permalink
rightUri => rightsUri
Browse files Browse the repository at this point in the history
  • Loading branch information
Zir0h committed Jul 17, 2024
1 parent f1a7bf0 commit b9a7a8c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/context/mintStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export const useMintStore = create<MintState>()(
thumbnail: used_thumb,
generateDisplayUri: true,
rights: license?.value,
rightUri: customLicenseData,
rightsUri: customLicenseData,
language: language?.value,
accessibility,
contentRating,
Expand All @@ -294,7 +294,7 @@ export const useMintStore = create<MintState>()(
cover: used_cover,
thumbnail: used_thumb,
rights: license?.value,
rightUri: customLicenseData,
rightsUri: customLicenseData,
language: language?.value,
accessibility,
contentRating,
Expand Down
26 changes: 13 additions & 13 deletions src/data/ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ interface PrepareProps {
cover: FileForm
thumbnail: FileForm
rights: string
rightUri?: string
rightsUri?: string
language?: string
accessibility: string
contentRating: string
Expand All @@ -167,7 +167,7 @@ export const prepareFile = async ({
cover,
thumbnail,
rights,
rightUri,
rightsUri,
language,
accessibility,
contentRating,
Expand Down Expand Up @@ -266,7 +266,7 @@ export const prepareFile = async ({
displayUri,
thumbnailUri,
rights,
rightUri,
rightsUri,
language,
accessibility,
contentRating,
Expand All @@ -291,7 +291,7 @@ export const prepareDirectory = async ({
thumbnail,
generateDisplayUri,
rights,
rightUri,
rightsUri,
language,
accessibility,
contentRating,
Expand All @@ -306,7 +306,7 @@ export const prepareDirectory = async ({
thumbnail: FileForm
generateDisplayUri: string
rights: string
rightUri: string
rightsUri: string
language: string
accessibility: string
contentRating: string
Expand Down Expand Up @@ -388,7 +388,7 @@ export const prepareDirectory = async ({
displayUri,
thumbnailUri,
rights,
rightUri,
rightsUri,
language,
accessibility,
contentRating,
Expand Down Expand Up @@ -456,7 +456,7 @@ async function buildMetadataFile({
displayUri = '',
thumbnailUri = IPFS_DEFAULT_THUMBNAIL_URI,
rights,
rightUri,
rightsUri,
language,
accessibility,
contentRating,
Expand All @@ -470,7 +470,7 @@ async function buildMetadataFile({
displayUri: string
thumbnailUri: string
rights: string
rightUri?: string
rightsUri?: string
language: string
accessibility: string
contentRating: string
Expand All @@ -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

Expand All @@ -526,6 +526,6 @@ interface TeiaMetadata {
//optional
accessibility?: string
contentRating?: string
rightUri?: string
rightsUri?: string
language?: string
}

0 comments on commit b9a7a8c

Please sign in to comment.