fix: correct formatCentsToCurrency usage in facebook scraper

This commit is contained in:
2026-01-23 14:46:50 -05:00
parent 2f97d3eafd
commit df0c528535

View File

@@ -840,8 +840,7 @@ export function parseFacebookAds(
title,
listingPrice: {
amountFormatted:
priceObj.formatted_amount ||
formatCentsToCurrency(cents / 100, "en-CA"),
priceObj.formatted_amount || formatCentsToCurrency(cents, "en-CA"),
cents,
currency: priceObj.currency || "CAD", // Facebook marketplace often uses CAD
},
@@ -888,8 +887,7 @@ export function parseFacebookItem(
if (!Number.isNaN(amount)) {
cents = Math.round(amount * 100);
amountFormatted =
item.formatted_price?.text ||
formatCentsToCurrency(cents / 100, "en-CA");
item.formatted_price?.text || formatCentsToCurrency(cents, "en-CA");
}
}
}