From d9e8f80c891180f0cf0bc6f7eb4c4359d7e76137 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Sat, 25 Apr 2020 10:19:06 -0300 Subject: [PATCH] fix: Remove decimals for the exact 0 (zero) amount --- src/logic/tokens/utils/formatAmount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logic/tokens/utils/formatAmount.js b/src/logic/tokens/utils/formatAmount.js index 6c4221afe0..a6b5e62804 100644 --- a/src/logic/tokens/utils/formatAmount.js +++ b/src/logic/tokens/utils/formatAmount.js @@ -18,7 +18,7 @@ export const formatAmount = (number: string | number) => { let numberFloat = parseFloat(number) if (numberFloat === 0) { - numberFloat = '0.000' + numberFloat = '0' } else if (numberFloat < 0.001) { numberFloat = '< 0.001' } else if (numberFloat < 1000) {