diff --git a/lib/monero/monero_transaction_info.dart b/lib/monero/monero_transaction_info.dart index e28835fee..70f14879d 100644 --- a/lib/monero/monero_transaction_info.dart +++ b/lib/monero/monero_transaction_info.dart @@ -21,7 +21,7 @@ class MoneroTransactionInfo extends TransactionInfo { isPending = parseBoolFromString(map['isPending'] as String), amount = map['amount'] as int, accountIndex = int.parse(map['accountIndex'] as String), - addressIndex = map['addressIndex'] as List, + addressIndex = map['addressIndex'] as int, key = getTxKey((map['hash'] ?? '') as String), fee = map['fee'] as int ?? 0; @@ -34,7 +34,7 @@ class MoneroTransactionInfo extends TransactionInfo { isPending = row.isPending != 0, amount = row.getAmount(), accountIndex = row.subaddrAccount, - addressIndex = row.getSubaddrIndex(), + addressIndex = row.subaddrIndex, key = getTxKey(row.getHash()), fee = row.fee; @@ -46,7 +46,7 @@ class MoneroTransactionInfo extends TransactionInfo { final bool isPending; final int amount; final int fee; - final List addressIndex; + final int addressIndex; String recipientAddress; String key; diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index 51afb355d..2ec151a2c 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -66,9 +66,9 @@ abstract class TransactionDetailsViewModelBase with Store { final accountIndex = tx.accountIndex; final addressIndex = tx.addressIndex; final _wallet = wallet as MoneroWallet; - - for (var index in addressIndex) { - final address = _wallet.getTransactionAddress(accountIndex, index); + final address = + _wallet.getTransactionAddress(accountIndex, addressIndex); + if (address?.isNotEmpty ?? false) { _items.add( StandartListItem( title: S.current.transaction_details_recipient_address,