Skip to content

Commit

Permalink
front bugs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matt5346 committed Mar 19, 2022
1 parent 1b88a15 commit 1d9e586
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions frontend/src/views/AddEffectConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ export default {
'getStatus',
'getEffect',
'getDeployedPictureMeta',
'getContract',
'getBundleContract',
]),
getNav() {
return [
Expand Down Expand Up @@ -182,29 +184,34 @@ export default {
'setResult',
'setDeployedPictureMeta',
'passNFT',
'createNewRandomNFT',
'createNewBundleNFT',
]),
// minting NFT with NEW effects
async handleMint() {
// this.$router.push({'name': 'Minting'})
await this.setResult()
await this.setDeployedPictureMeta()
const obj = {
const bundleArr = [this.NFTComputedData]
// TODO: make approval checking of ALL TOKENS, should be SAME
let approval_id = null
if (bundleArr[0].approved_account_ids) {
approval_id = bundleArr[0].approved_account_ids[this.getBundleContract.contractId]
}
const newBundle = bundleArr.map((item) => ({ ...item, contract: this.getContract.contractId, approval_id }))
console.log(bundleArr, 'bundleArr')
console.log(approval_id, 'approval_id')
console.log(newBundle, 'newBundle')
this.createNewBundleNFT({
token_id: `token-${Date.now()}`,
metadata: {
title: this.nftObj.metadata.title,
description: this.nftObj.metadata.description,
media: this.getDeployedPictureMeta,
copies: 1,
},
}
this.createNFTWithEffect(obj)
console.log('handleMint')
},
createNFTWithEffect(obj) {
this.createNewRandomNFT({
token_id: obj.token_id,
metadata: obj.metadata,
bundles: bundleArr.map((item) => ({ ...item, contract: this.getContract.contractId, approval_id })),
})
},
},
Expand Down

0 comments on commit 1d9e586

Please sign in to comment.