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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user