Skip to content

Commit

Permalink
replace double quotes with single
Browse files Browse the repository at this point in the history
  • Loading branch information
tempe-techie committed Nov 3, 2023
1 parent f18466a commit f61b4d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions components/nft/collection/ChangeDescriptionModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ export default {
const metadataContract = new ethers.Contract(this.mdAddress, metadataInterface, this.signer);
try {
const tx = await metadataContract.setDescription(this.cAddress, this.editDescription);
const tx = await metadataContract.setDescription(
this.cAddress,
this.editDescription.replace(/"/g, "'") // replace double quotes with single quotes
);
const toastWait = this.toast(
{
Expand All @@ -96,7 +99,7 @@ export default {
});
this.$emit("saveCollection", {
description: this.editDescription
description: this.editDescription.replace(/"/g, "'") // replace double quotes with single quotes
});
this.editDescription = null;
Expand Down
10 changes: 8 additions & 2 deletions pages/nft/create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ export default {
},
computed: {
cleanDescription() {
if (!this.cDescription) return null;
return this.cDescription.replace(/"/g, "'") // replace double quotes with single quotes
},
createPrice() {
if (!this.createPriceWei) return null;
Expand Down Expand Up @@ -251,7 +257,7 @@ export default {
try {
const tx = await launchpadContract.launch(
this.address, // contract owner
this.cDescription, // collection description
this.cleanDescription, // collection description
this.cImage, // collection image
this.nftName, // NFT name
this.cName, // collection name
Expand Down Expand Up @@ -380,7 +386,7 @@ export default {
type: "nftCollectionCreated",
authorAddress: String(this.address),
collectionAddress: String(nftContractAddress),
collectionDescription: this.cDescription,
collectionDescription: this.cleanDescription,
collectionImage: this.cImage.replace("?.img", ""),
collectionName: this.cName,
collectionRatio: this.ratio,
Expand Down

0 comments on commit f61b4d9

Please sign in to comment.