fix(webhook): remove incorrect /100 division from formatPrice
Some checks failed
Build and Deploy / build (push) Has been cancelled
Some checks failed
Build and Deploy / build (push) Has been cancelled
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user