Files
hash-wallet/lib/entities/format_amount.dart
T

11 lines
330 B
Dart

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