mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
11 lines
330 B
Dart
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);
|
|
}
|