mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-23 19:16:09 +00:00
Fix fee priority display (#540)
* Fix transaction priority displaying empty string * Fix priority label with rate in send screen * Make price nullable in transaction list items
This commit is contained in:
parent
e011ab3e88
commit
e1885e44a2
3 changed files with 5 additions and 7 deletions
|
@ -53,7 +53,7 @@ class TransactionListItem extends ActionListItem with Keyable {
|
|||
break;
|
||||
case WalletType.haven:
|
||||
final asset = haven!.assetOfTransaction(transaction);
|
||||
final price = balanceViewModel.fiatConvertationStore.prices[asset]!;
|
||||
final price = balanceViewModel.fiatConvertationStore.prices[asset];
|
||||
amount = calculateFiatAmountRaw(
|
||||
cryptoAmount: haven!.formatterMoneroAmountToDouble(amount: transaction.amount),
|
||||
price: price);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:cake_wallet/entities/balance_display_mode.dart';
|
||||
import 'package:cake_wallet/entities/transaction_description.dart';
|
||||
import 'package:cake_wallet/view_model/dashboard/balance_view_model.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_transaction_priority.dart';
|
||||
import 'package:cw_core/transaction_priority.dart';
|
||||
import 'package:cake_wallet/view_model/send/output.dart';
|
||||
import 'package:cake_wallet/view_model/send/send_template_view_model.dart';
|
||||
|
@ -275,9 +276,7 @@ abstract class SendViewModelBase with Store {
|
|||
|
||||
if (isElectrumWallet) {
|
||||
final rate = bitcoin!.getFeeRate(wallet, _priority);
|
||||
// FIX-ME: labelWithRate
|
||||
// return '${priority.labelWithRate(rate)}';
|
||||
return '';
|
||||
return '${(priority as BitcoinTransactionPriority).labelWithRate(rate)}';
|
||||
}
|
||||
|
||||
return priority.toString();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:cake_wallet/entities/language_service.dart';
|
||||
import 'package:cake_wallet/store/yat/yat_store.dart';
|
||||
import 'package:cake_wallet/view_model/settings/choices_list_item.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_transaction_priority.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
|
@ -136,9 +137,7 @@ abstract class SettingsViewModelBase with Store {
|
|||
if (wallet.type == WalletType.bitcoin
|
||||
|| wallet.type == WalletType.litecoin) {
|
||||
final rate = bitcoin!.getFeeRate(wallet, _priority);
|
||||
// FIX-ME: BitcoinTransactionPriority
|
||||
// return '${priority.labelWithRate(rate)}';
|
||||
return '';
|
||||
return '${(priority as BitcoinTransactionPriority).labelWithRate(rate)}';
|
||||
}
|
||||
|
||||
return priority.toString();
|
||||
|
|
Loading…
Reference in a new issue