Skip to content

Commit

Permalink
🚑 Fix unable claiming collection
Browse files Browse the repository at this point in the history
  • Loading branch information
nwingt committed Jul 26, 2024
1 parent 00cbfde commit 284d1d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/middleware/from-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default context => {

// If the from query is present in the current route but not in the next route, add it to the next route
if (
fromRoute &&
fromRoute.query.from &&
!toRoute.query.from &&
// Exclude navigating from /nft/* routes
Expand Down
8 changes: 5 additions & 3 deletions src/pages/nft/claim/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ export default {
canViewContentDirectly() {
return (
!this.isFreePurchase &&
this.classIds.some(classId =>
this.classIds?.some(classId =>
this.getCanViewNFTBookBeforeClaimByClassId(classId)
)
);
Expand Down Expand Up @@ -673,7 +673,9 @@ export default {
}
try {
if (this.collectionId) {
await this.lazyFetchNFTCollectionInfoByCollectionId(this.collectionId);
await this.lazyFetchNFTCollectionInfoByCollectionId({
collectionId: this.collectionId,
});
} else if (this.classId) {
await this.lazyGetNFTClassMetadata(this.classId);
const classCollectionType = getNFTClassCollectionType(
Expand All @@ -688,7 +690,7 @@ export default {
console.error(err);
this.$nuxt.error({
statusCode: 404,
message: this.t('nft_claim_class_not_found'),
message: this.$t('nft_claim_class_not_found'),
});
return;
}
Expand Down

0 comments on commit 284d1d1

Please sign in to comment.