Fixed incorrect price amount formatting

no refs

- price amount formatting was incorrectly calling `toFixed` method on a string, which is not needed as we already round off the amount before formatting
This commit is contained in:
Rishabh 2022-01-18 15:15:55 +05:30
parent 4994e27838
commit 209d3662d4

View File

@ -7,7 +7,7 @@ export function ghPriceAmount(amount) {
if (price % 1 === 0) { if (price % 1 === 0) {
return formatNumber(price); return formatNumber(price);
} else { } else {
return formatNumber(Math.round(price * 100) / 100).toFixed(2); return formatNumber(Math.round(price * 100) / 100);
} }
} }
return 0; return 0;