fix: correct formatCentsToCurrency usage in facebook scraper

This commit is contained in:
old4ever committed 2026-01-23 14:50:41 -05:00
1 parent 2f97d3eafd
commit df0c528535
1 file changed
+2 -4
+2 -4
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");
}
}
}