cake_wallet/lib/entities/format_amount.dart

8 lines
233 B
Dart
Raw Permalink Normal View History

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