Merge pull request #198 from public-awesome/develop

Sync dev > main
This commit is contained in:
Adnan Deniz Corlu 2023-08-04 10:46:15 +03:00 committed by GitHub
commit 9b8c3e3e7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 7 deletions

View File

@ -244,7 +244,7 @@ export const CollectionActions = ({
const resolveRoyaltyPaymentAddress = async () => {
await resolveAddress(royaltyPaymentAddressState.value.trim(), wallet).then((resolvedAddress) => {
setCollectionInfo({
description: descriptionState.value || undefined,
description: descriptionState.value.replace('\\n', '\n') || undefined,
image: imageState.value || undefined,
explicit_content: explicitContent,
external_link: externalLinkState.value || undefined,
@ -265,7 +265,7 @@ export const CollectionActions = ({
useEffect(() => {
setCollectionInfo({
description: descriptionState.value || undefined,
description: descriptionState.value.replace('\\n', '\n') || undefined,
image: imageState.value || undefined,
explicit_content: explicitContent,
external_link: externalLinkState.value || undefined,

View File

@ -435,6 +435,8 @@ 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.replace('\\n', '\n')
const metadataFileBlob = new Blob([JSON.stringify(data)], {
type: 'application/json',
})
@ -496,7 +498,7 @@ export const OpenEditionMinterCreator = ({
? {
image: uri,
name: onChainMetadataInputDetails?.name,
description: onChainMetadataInputDetails?.description,
description: onChainMetadataInputDetails?.description?.replace('\\n', '\n'),
attributes: onChainMetadataInputDetails?.attributes,
external_url: onChainMetadataInputDetails?.external_url,
animation_url:
@ -524,7 +526,7 @@ export const OpenEditionMinterCreator = ({
symbol: collectionDetails?.symbol,
info: {
creator: wallet.address,
description: collectionDetails?.description,
description: collectionDetails?.description.replace('\\n', '\n'),
image: coverImageUri,
explicit_content: collectionDetails?.explicit || false,
royalty_info: royaltyInfo,

View File

@ -189,7 +189,7 @@ const BadgeCreationPage: NextPage = () => {
manager: badgeDetails?.manager as string,
metadata: {
name: badgeDetails?.name || undefined,
description: badgeDetails?.description || undefined,
description: badgeDetails?.description?.replace('\\n', '\n') || undefined,
image: coverUrl || undefined,
image_data: badgeDetails?.image_data || undefined,
external_url: badgeDetails?.external_url || undefined,

View File

@ -547,7 +547,7 @@ const CollectionCreationPage: NextPage = () => {
symbol: collectionDetails?.symbol,
info: {
creator: wallet.address,
description: collectionDetails?.description,
description: collectionDetails?.description.replace('\\n', '\n'),
image: `${
uploadDetails?.uploadMethod === 'new'
? `ipfs://${coverImageUri}/${collectionDetails?.imageFile[0].name as string}`
@ -613,7 +613,7 @@ const CollectionCreationPage: NextPage = () => {
symbol: collectionDetails?.symbol,
info: {
creator: wallet.address,
description: collectionDetails?.description,
description: collectionDetails?.description.replace('\\n', '\n'),
image: `${
uploadDetails?.uploadMethod === 'new'
? `ipfs://${coverImageUri}/${collectionDetails?.imageFile[0].name as string}`
@ -735,6 +735,8 @@ 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.replace('\\n', '\n')
const metadataFileBlob = new Blob([JSON.stringify(data)], {
type: 'application/json',
})
@ -789,6 +791,8 @@ const CollectionCreationPage: NextPage = () => {
type: 'application/json',
})
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
data.description = data.description.replace('\\n', '\n')
console.log('Name: ', (uploadDetails.baseMinterMetadataFile as File).name)
const updatedMetadataFile = new File(
[metadataFileBlob],