Skip to content

Commit

Permalink
🎨 Simplify cross-sell block check
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Oct 31, 2024
1 parent 6dcef45 commit 5865063
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/constant/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ export const RECOMMENDATION_GROUPS = IS_TESTNET
'likenft1ekvx3en9l0640kv9fd5n5hvltwyfl443ymyu2cnhmalvjfy0cdcqqa3l6h',
'likenft16cns9jk7cathhpe62v6jpyxam6z8ltdk3jw08xpmkrz53s3cknxqulpd0u',
],
// =
[
'likenft17zq3r5t2qwfatle04sz680vl3ka0l8wfeu4n5jv26mnvawnfqs4qd773ny',
'likenft154xhw0qyds5pgvsyc7379lnkyvwqkvv2zvmmh2gn5qrewljeqwys2sju6x',
Expand Down
5 changes: 2 additions & 3 deletions src/mixins/cross-sell.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ export default {
? true
: Math.random() < CROSS_SELL_PRODUCT_PROBABILITY;

const isCrossSellBlocked = !(
CROSS_SELL_WHITE_LIST.includes(this.classId) ||
CROSS_SELL_WHITE_LIST.includes(this.collectionId)
const isCrossSellBlocked = !CROSS_SELL_WHITE_LIST.find(
id => id === this.classId || id === this.collectionId
);

return shouldAttemptCrossSell && !isCrossSellBlocked;
Expand Down

0 comments on commit 5865063

Please sign in to comment.