Address upload issue when token metadata lacks a description
This commit is contained in:
parent
958671a030
commit
26a5423599
@ -468,8 +468,10 @@ export const OpenEditionMinterCreator = ({
|
||||
if (getAssetType(offChainMetadataUploadDetails.assetFiles[0].name) !== 'html')
|
||||
data.image = `ipfs://${assetUri}/${offChainMetadataUploadDetails.assetFiles[0].name}`
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
data.description = data.description.replaceAll('\\n', '\n')
|
||||
if (data.description) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
data.description = data.description.replaceAll('\\n', '\n')
|
||||
}
|
||||
const metadataFileBlob = new Blob([JSON.stringify(data)], {
|
||||
type: 'application/json',
|
||||
})
|
||||
|
@ -741,8 +741,10 @@ const CollectionCreationPage: NextPage = () => {
|
||||
if (getAssetType(uploadDetails.assetFiles[i].name) !== 'html')
|
||||
data.image = `ipfs://${assetUri}/${uploadDetails.assetFiles[i].name}`
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
data.description = data.description.replaceAll('\\n', '\n')
|
||||
if (data.description) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
data.description = data.description.replaceAll('\\n', '\n')
|
||||
}
|
||||
const metadataFileBlob = new Blob([JSON.stringify(data)], {
|
||||
type: 'application/json',
|
||||
})
|
||||
@ -797,8 +799,10 @@ const CollectionCreationPage: NextPage = () => {
|
||||
type: 'application/json',
|
||||
})
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
data.description = data.description.replaceAll('\\n', '\n')
|
||||
if (data.description) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
data.description = data.description.replaceAll('\\n', '\n')
|
||||
}
|
||||
console.log('Name: ', (uploadDetails.baseMinterMetadataFile as File).name)
|
||||
const updatedMetadataFile = new File(
|
||||
[metadataFileBlob],
|
||||
|
Loading…
Reference in New Issue
Block a user