From 9c2e4e1383a24aea66ec552c33244a21986c7634 Mon Sep 17 00:00:00 2001 From: Unchained Date: Wed, 25 Mar 2026 19:50:39 +0200 Subject: [PATCH] fix(webhook): remove incorrect /100 division from formatPrice Saleor stores amounts as actual currency values (e.g., 5479 RSD), not as cents (e.g., 547900). The formatPrice function was incorrectly dividing by 100, causing prices like 5479 RSD to display as 55 RSD. --- src/app/api/webhooks/saleor/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/webhooks/saleor/route.ts b/src/app/api/webhooks/saleor/route.ts index bc676ab..856a56b 100644 --- a/src/app/api/webhooks/saleor/route.ts +++ b/src/app/api/webhooks/saleor/route.ts @@ -209,7 +209,7 @@ function formatPrice(amount: number, currency: string): string { return new Intl.NumberFormat("sr-RS", { style: "currency", currency: currency, - }).format(amount / 100); + }).format(amount); } function formatAddress(address?: SaleorAddress): string {