Merge pull request #137 from cake-tech/CAKE-160-remove-digit-after-dots-for-cryptobalance

CAKE-160 | added to format_amount.dart case when amount contains ',' …
This commit is contained in:
M 2020-11-11 21:03:33 +02:00
commit 36b8cc9086

View file

@ -1,7 +1,7 @@
String formatAmount(String amount) {
if (!amount.contains('.')) {
if ((!amount.contains('.'))&&(!amount.contains(','))) {
return amount + '.00';
} else if (amount.endsWith('.')) {
} else if ((amount.endsWith('.'))||(amount.endsWith(','))) {
return amount + '00';
}
return amount;