Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: adjust hash for metadata #10148

Merged
merged 9 commits into from
May 27, 2024
20 changes: 4 additions & 16 deletions components/collection/drop/PaidGenerative.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
:action="action"
:status="status"
:is-error="isError"
@confirm="handleConfirmPaidMint"
@close="handleMintModalClose"
@confirm="mintNft"
@close="closeMintModal"
@list="handleList" />
</template>

Expand Down Expand Up @@ -106,21 +106,13 @@ const handleSubmitMint = async () => {
return false
}

openMintModal()
await massGenerate()
}

const openMintModal = () => {
isMintModalActive.value = true
}

const handleMintModalClose = () => {
closeMintModal()
clearMassMint()
hassnian marked this conversation as resolved.
Show resolved Hide resolved
await massGenerate()
}

const closeMintModal = () => {
isMintModalActive.value = false
clearMassMint()
}

const submitMints = async () => {
Expand All @@ -142,10 +134,6 @@ const handleList = () => {
openListingCartModal()
}

const handleConfirmPaidMint = () => {
mintNft()
}

const stopMint = () => {
if (isAutoTeleportModalOpen.value) {
return
Expand Down
1 change: 0 additions & 1 deletion composables/drop/massmint/useDropMassMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ export default () => {
collection: drop.value.collection,
nft: nft.sn,
sn: nft.index,
hash: nft.hash,
}).then((result) => resolve(result))
} catch (e) {
reject(e)
Expand Down
4 changes: 2 additions & 2 deletions composables/drop/useGenerativeDropMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ export const useUpdateMetadata = async () => {

if (checkIndex.size === amountToMint.value) {
status.value = 'update'
await updateMetadata()
await submitMetadata()
}
},
})

// 2. update metadata
const mintedNfts: Ref<MintedNFT[]> = ref([])
const updateMetadata = async () => {
const submitMetadata = async () => {
const response = await Promise.all(mintNFTs.value.map(submitMint))

for (const [index, res] of response.entries()) {
Expand Down
4 changes: 2 additions & 2 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@
"newToKoda": "New to Koda?",
"startConnect": "Start trading NFTs by connecting a digital wallet.",
"quickSteps": "Quick Steps to Begin:",
"chooseWallet":"Choose a Wallet: ",
"chooseWallet": "Choose a Wallet: ",
"chooseBelow": "Choose from trusted providers below.",
"downloadAndConnect": "Download and Connect: ",
"setUpConnect": "Set up your wallet, then return to connect.",
Expand Down Expand Up @@ -1598,7 +1598,7 @@
"proceedToSigning": "Proceed to signing",
"signTransaction": "Sign Transaction",
"paidDropWhyTooltip": "A balance above <strong>{0}</strong> is required to maintain your account's activity, covering the <strong>{1} Existential Deposit,</strong> and to enable seamless future actions.",
"createNewVariation": "Create your new variation",
"createNewVariation": "Preview Variations",
"holderOfCollection": "Holder of NFT from {name} collection",
"mintForFree": "Mint For Free Now",
"mintForPaid": "Mint For {0}",
Expand Down
3 changes: 1 addition & 2 deletions services/fxart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const setMetadataUrl = ({ chain, collection, hash }) => {
return metadataUrl.toString()
}

export const updateMetadata = async ({ chain, collection, nft, sn, hash }) => {
export const updateMetadata = async ({ chain, collection, nft, sn }) => {
try {
const response = await api<DoResult>('/metadata/v2/update', {
method: 'post',
Expand All @@ -130,7 +130,6 @@ export const updateMetadata = async ({ chain, collection, nft, sn, hash }) => {
collection,
nft,
sn,
hash,
},
})

Expand Down