cake_wallet/lib/entities/format_amount.dart
2020-09-21 14:50:26 +03:00

8 lines
No EOL
180 B
Dart

String formatAmount(String amount) {
if (!amount.contains('.')) {
return amount + '.00';
} else if (amount.endsWith('.')) {
return amount + '00';
}
return amount;
}