Skip to content

Commit

Permalink
👔 Change free logic in claim page
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Jan 23, 2025
1 parent 4fb3c30 commit 21936f8
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/pages/nft/claim/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -815,12 +815,11 @@ export default {
},
},
async mounted() {
const { redirect, free, from, state, ...query } = this.$route.query;
const { redirect, from, state, ...query } = this.$route.query;
if (
!free &&
((!this.classId && !this.collectionId && !this.cartId) ||
!this.token ||
!this.paymentId)
(!this.classId && !this.collectionId && !this.cartId) ||
!this.token ||
!this.paymentId
) {
this.$nuxt.error({
statusCode: 400,
Expand Down Expand Up @@ -903,17 +902,10 @@ export default {
console.error(err);
}
}
} else {
// free purchase?
await this.lazyFetchNFTBookInfoByClassId(this.classId);
const { prices } = this.getNFTBookStoreInfoByClassId(this.classId);
const data = prices[this.priceIndex];
const { isPhysicalOnly, autoMemo, isAutoDeliver } = data;
this.isPhysicalOnly = isPhysicalOnly;
this.isAutoDeliver = isAutoDeliver;
this.creatorMessage = parseAutoMemo(autoMemo);
}
const free = this.isFreePurchase || !price;
try {
if (this.cartItems.length) {
await Promise.all(
Expand Down

0 comments on commit 21936f8

Please sign in to comment.