mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-21 10:24:15 +01:00
Merge pull request #31 from cake-tech/CWA-169-add-morph-exchange-to-the-app
Cwa 169 add morph exchange to the app
This commit is contained in:
@@ -0,0 +1 @@
|
||||
double cryptoAmountToDouble({num amount, num divider}) => amount / divider;
|
||||
@@ -0,0 +1,8 @@
|
||||
String formatAmount(String amount) {
|
||||
if (!amount.contains('.')) {
|
||||
return amount + '.00';
|
||||
} else if (amount.endsWith('.')) {
|
||||
return amount + '00';
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
@@ -2,6 +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/format_amount.dart';
|
||||
|
||||
class TransactionInfo {
|
||||
TransactionInfo(this.id, this.height, this.direction, this.date,
|
||||
@@ -40,9 +41,9 @@ class TransactionInfo {
|
||||
|
||||
String _fiatAmount;
|
||||
|
||||
String amountFormatted() => '${moneroAmountToString(amount: amount)} XMR';
|
||||
String amountFormatted() => '${formatAmount(moneroAmountToString(amount: amount))} XMR';
|
||||
|
||||
String fiatAmount() => _fiatAmount ?? '';
|
||||
|
||||
void changeFiatAmount(String amount) => _fiatAmount = amount;
|
||||
void changeFiatAmount(String amount) => _fiatAmount = formatAmount(amount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user