Skip to content

Commit

Permalink
🔥 Remove coupon from price query
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Sep 26, 2024
1 parent 9f7698b commit 2803a8a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/mixins/nft-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export default {
await catchAxiosError(
this.lazyFetchNFTCollectionPaymentPriceInfoByCollectionId({
collectionId: this.collectionId,
coupon: this.$route.query.coupon,
})
);
},
Expand Down
3 changes: 0 additions & 3 deletions src/mixins/nft.js
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ export default {
this.fetchNFTBookPaymentPriceInfoByClassIdAndPriceIndex({
classId: this.classId,
priceIndex: this.editionPriceIndex,
coupon: this.$route.query.coupon,
})
);
},
Expand All @@ -848,7 +847,6 @@ export default {
this.lazyFetchNFTBookPaymentPriceInfoByClassIdAndPriceIndex({
classId: this.classId,
priceIndex: this.editionPriceIndex,
coupon: this.$route.query.coupon,
})
);
},
Expand All @@ -861,7 +859,6 @@ export default {
this.lazyFetchNFTBookPaymentPriceInfoByClassIdAndPriceIndex({
classId: this.classId,
priceIndex: index,
coupon: this.$route.query.coupon,
})
);
})
Expand Down
17 changes: 7 additions & 10 deletions src/store/modules/nft.js
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,12 @@ const actions = {
},
async fetchNFTBookPaymentPriceInfoByClassIdAndPriceIndex(
{ commit },
{ classId, priceIndex, coupon }
{ classId, priceIndex }
) {
const {
data: { fiatPrice, LIKEPrice },
} = await this.$api.get(
api.getNFTBookPaymentPrice({ classId, priceIndex, coupon })
api.getNFTBookPaymentPrice({ classId, priceIndex })
);
const info = { fiatPrice, LIKEPrice };
commit(TYPES.NFT_SET_NFT_CLASS_PAYMENT_PRICE_INFO, {
Expand All @@ -842,7 +842,7 @@ const actions = {
},
async lazyFetchNFTBookPaymentPriceInfoByClassIdAndPriceIndex(
{ getters, dispatch },
{ classId, priceIndex, coupon }
{ classId, priceIndex }
) {
let info = getters.getNFTClassPaymentPriceById(classId, priceIndex);
if (!info) {
Expand All @@ -851,7 +851,6 @@ const actions = {
{
classId,
priceIndex,
coupon,
}
);
}
Expand Down Expand Up @@ -916,14 +915,12 @@ const actions = {
},
async fetchNFTCollectionPaymentPriceInfoByCollectionId(
{ commit },
{ collectionId, coupon }
{ collectionId }
) {
try {
const {
data: { fiatPricePrediscount, fiatPrice, LIKEPrice },
} = await this.$api.get(
api.getNFTBookPaymentPrice({ collectionId, coupon })
);
} = await this.$api.get(api.getNFTBookPaymentPrice({ collectionId }));
const info = { fiatPricePrediscount, fiatPrice, LIKEPrice };
commit(TYPES.NFT_SET_NFT_CLASS_PAYMENT_PRICE_INFO, {
collectionId,
Expand All @@ -939,13 +936,13 @@ const actions = {
},
async lazyFetchNFTCollectionPaymentPriceInfoByCollectionId(
{ getters, dispatch },
{ collectionId, coupon }
{ collectionId }
) {
let info = getters.getNFTClassPaymentPriceById(collectionId);
if (!info) {
info = await dispatch(
'fetchNFTCollectionPaymentPriceInfoByCollectionId',
{ collectionId, coupon }
{ collectionId }
);
}
return info;
Expand Down
2 changes: 0 additions & 2 deletions src/util/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,9 @@ export const getNFTBookPaymentPrice = ({
classId,
collectionId,
priceIndex,
coupon,
}) => {
const qsPayload = {
price_index: priceIndex,
coupon,
};
return collectionId
? `${LIKECOIN_API_BASE}/likernft/book/collection/purchase/${collectionId}/price?${querystring.stringify(
Expand Down

0 comments on commit 2803a8a

Please sign in to comment.