We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2169530 commit 72d282fCopy full SHA for 72d282f
src/libs/CurrencyUtils.ts
@@ -98,7 +98,8 @@ function convertToFrontendAmountAsInteger(amountAsInt: number): number {
98
* @note we do not support any currencies with more than two decimal places.
99
*/
100
function convertToFrontendAmountAsString(amountAsInt: number): string {
101
- return convertToFrontendAmountAsInteger(amountAsInt).toFixed(2);
+ const shouldShowDecimal = amountAsInt % 100 === 0;
102
+ return amountAsInt ? convertToFrontendAmountAsInteger(amountAsInt).toFixed(shouldShowDecimal ? 0 : 2) : '';
103
}
104
105
/**
0 commit comments