From aa7a0ed3c8ee986c3c4a9af12a5b8cd06fa2657f 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 a1d094e..5893a1c 100644 --- a/src/app/api/webhooks/saleor/route.ts +++ b/src/app/api/webhooks/saleor/route.ts @@ -201,7 +201,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 {