mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
9 lines
238 B
Dart
9 lines
238 B
Dart
String formatAmount(String amount) {
|
|
if ((!amount.contains('.')) && (!amount.contains(','))) {
|
|
return amount + '.00';
|
|
} else if ((amount.endsWith('.')) || (amount.endsWith(','))) {
|
|
return amount + '00';
|
|
}
|
|
return amount;
|
|
}
|