Skip to content

Commit

Permalink
🔀 Merge master to deploy/rinkeby
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Sep 26, 2024
2 parents 6b244da + ff6bac6 commit 24a9737
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 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 @@ -818,7 +818,6 @@ export default {
this.fetchNFTBookPaymentPriceInfoByClassIdAndPriceIndex({
classId: this.classId,
priceIndex: this.editionPriceIndex,
coupon: this.$route.query.coupon,
})
);
},
Expand All @@ -827,7 +826,6 @@ export default {
this.lazyFetchNFTBookPaymentPriceInfoByClassIdAndPriceIndex({
classId: this.classId,
priceIndex: this.editionPriceIndex,
coupon: this.$route.query.coupon,
})
);
},
Expand All @@ -840,7 +838,6 @@ export default {
this.lazyFetchNFTBookPaymentPriceInfoByClassIdAndPriceIndex({
classId: this.classId,
priceIndex: index,
coupon: this.$route.query.coupon,
})
);
})
Expand Down
18 changes: 18 additions & 0 deletions src/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,13 @@ const nuxtConfig = {
'www.google.com',
'googleads.g.doubleclick.net',
'www.googleadservices.com',

// stripe
'https://js.stripe.com',
'https://checkout.stripe.com',
'https://*.js.stripe.com',
'https://maps.googleapis.com',

'https://unpkg.com/@google/[email protected]/',
'https://substackapi.com',
'*.crisp.chat',
Expand All @@ -269,7 +275,13 @@ const nuxtConfig = {
'blob:',
'www.google.com',
'button.like.co',

// stripe
'https://js.stripe.com',
'https://*.js.stripe.com',
'https://hooks.stripe.com',
'https://checkout.stripe.com',

'bid.g.doubleclick.net',
'td.doubleclick.net',
'https://likecoin.github.io',
Expand All @@ -284,6 +296,12 @@ const nuxtConfig = {
"'self'",
'data:',
'*',

// stripe
'https://checkout.stripe.com',
'https://api.stripe.com',
'https://maps.googleapis.com',

'wss://client.relay.crisp.chat',
],
'style-src': [
Expand Down
1 change: 0 additions & 1 deletion src/static/vendor/fbq.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1013529535523534');
fbq('init', '4022559437964917');
fbq('track', 'PageView');
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 @@ -417,11 +417,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 24a9737

Please sign in to comment.