mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
* feat: Mask fiat amounts to be more readable, with comma formating for large numbers * fix: Add fiat masking to buy and sell
10 lines
325 B
Dart
10 lines
325 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);
|
|
} |