mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
CWA-169 | renamed checkAmount() to formatAmount()
This commit is contained in:
parent
30a7e5c4c8
commit
d88945411f
3 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
String checkAmount(String amount) {
|
||||
String formatAmount(String amount) {
|
||||
if (!amount.contains('.')) {
|
||||
return amount + '.00';
|
||||
} else if (amount.endsWith('.')) {
|
|
@ -2,7 +2,7 @@ import 'package:cake_wallet/src/domain/monero/monero_amount_format.dart';
|
|||
import 'package:cw_monero/structs/transaction_info_row.dart';
|
||||
import 'package:cake_wallet/src/domain/common/parseBoolFromString.dart';
|
||||
import 'package:cake_wallet/src/domain/common/transaction_direction.dart';
|
||||
import 'package:cake_wallet/src/domain/common/check_amount.dart';
|
||||
import 'package:cake_wallet/src/domain/common/format_amount.dart';
|
||||
|
||||
class TransactionInfo {
|
||||
TransactionInfo(this.id, this.height, this.direction, this.date,
|
||||
|
@ -41,9 +41,9 @@ class TransactionInfo {
|
|||
|
||||
String _fiatAmount;
|
||||
|
||||
String amountFormatted() => '${checkAmount(moneroAmountToString(amount: amount))} XMR';
|
||||
String amountFormatted() => '${formatAmount(moneroAmountToString(amount: amount))} XMR';
|
||||
|
||||
String fiatAmount() => _fiatAmount ?? '';
|
||||
|
||||
void changeFiatAmount(String amount) => _fiatAmount = checkAmount(amount);
|
||||
void changeFiatAmount(String amount) => _fiatAmount = formatAmount(amount);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import 'package:hive/hive.dart';
|
|||
import 'package:cake_wallet/src/domain/common/crypto_currency.dart';
|
||||
import 'package:cake_wallet/src/domain/exchange/exchange_provider_description.dart';
|
||||
import 'package:cake_wallet/src/domain/exchange/trade_state.dart';
|
||||
import 'package:cake_wallet/src/domain/common/check_amount.dart';
|
||||
import 'package:cake_wallet/src/domain/common/format_amount.dart';
|
||||
|
||||
part 'trade.g.dart';
|
||||
|
||||
|
@ -103,5 +103,5 @@ class Trade extends HiveObject {
|
|||
};
|
||||
}
|
||||
|
||||
String amountFormatted() => checkAmount(amount);
|
||||
String amountFormatted() => formatAmount(amount);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue