Skip to content

Commit

Permalink
Fallback to Etched USD price in the Price USD/Price sorting/grouping.
Browse files Browse the repository at this point in the history
Cards with only the Etched finish only contain a usd_etched price. The
Price shown in the card modal uses the card finish, and for Etched
checks in the reverse order of etched, foil, regular price.
  • Loading branch information
KaelenProctor committed Feb 11, 2025
1 parent 7abefde commit fbaf90c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/utils/Sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ export function cardGetLabels(card: Card, sort: string, showOther = false): stri
} else if (sort === 'Creature/Non-Creature') {
ret = cardType(card).toLowerCase().includes('creature') ? ['Creature'] : ['Non-Creature'];
} else if (sort === 'Price USD' || sort === 'Price') {
const price = card.details?.prices.usd ?? card.details?.prices.usd_foil;
const price = card.details?.prices.usd ?? card.details?.prices.usd_foil ?? card.details?.prices.usd_etched;
if (price) {
ret = [getPriceBucket(price, '$')];
} else {
Expand Down

0 comments on commit fbaf90c

Please sign in to comment.