mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-05 10:29:23 +00:00
CAKE-160 | added to format_amount.dart case when amount contains ',' symbol
This commit is contained in:
parent
b17e7744c6
commit
5ce4fe7407
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
String formatAmount(String amount) {
|
String formatAmount(String amount) {
|
||||||
if (!amount.contains('.')) {
|
if ((!amount.contains('.'))&&(!amount.contains(','))) {
|
||||||
return amount + '.00';
|
return amount + '.00';
|
||||||
} else if (amount.endsWith('.')) {
|
} else if ((amount.endsWith('.'))||(amount.endsWith(','))) {
|
||||||
return amount + '00';
|
return amount + '00';
|
||||||
}
|
}
|
||||||
return amount;
|
return amount;
|
||||||
|
|
Loading…
Reference in a new issue