From 061658f2e90fe802ae9db570ce413e7195d0b730 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 13 Jan 2023 15:44:14 -0600 Subject: [PATCH] dynamic map value fix --- lib/services/coins/dogecoin/dogecoin_wallet.dart | 5 ++++- lib/services/coins/litecoin/litecoin_wallet.dart | 5 ++++- lib/services/coins/namecoin/namecoin_wallet.dart | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/services/coins/dogecoin/dogecoin_wallet.dart b/lib/services/coins/dogecoin/dogecoin_wallet.dart index f363d72d9..ed887d1bb 100644 --- a/lib/services/coins/dogecoin/dogecoin_wallet.dart +++ b/lib/services/coins/dogecoin/dogecoin_wallet.dart @@ -1863,7 +1863,10 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { ); if (!_duplicateTxCheck(allTransactions, tx["txid"] as String)) { - tx["address"] = txHash["address"]; + tx["address"] = await isar.addresses + .filter() + .valueEqualTo(txHash["address"] as String) + .findFirst(); tx["height"] = txHash["height"]; allTransactions.add(tx); } diff --git a/lib/services/coins/litecoin/litecoin_wallet.dart b/lib/services/coins/litecoin/litecoin_wallet.dart index 6490a7f58..e596a9072 100644 --- a/lib/services/coins/litecoin/litecoin_wallet.dart +++ b/lib/services/coins/litecoin/litecoin_wallet.dart @@ -2122,7 +2122,10 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { // Logging.instance.log("TRANSACTION: ${jsonEncode(tx)}"); if (!_duplicateTxCheck(allTransactions, tx["txid"] as String)) { - tx["address"] = txHash["address"]; + tx["address"] = await isar.addresses + .filter() + .valueEqualTo(txHash["address"] as String) + .findFirst(); tx["height"] = txHash["height"]; allTransactions.add(tx); } diff --git a/lib/services/coins/namecoin/namecoin_wallet.dart b/lib/services/coins/namecoin/namecoin_wallet.dart index bb9e872ce..760c0afd6 100644 --- a/lib/services/coins/namecoin/namecoin_wallet.dart +++ b/lib/services/coins/namecoin/namecoin_wallet.dart @@ -2103,7 +2103,10 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB { // Logging.instance.log("TRANSACTION: ${jsonEncode(tx)}"); if (!_duplicateTxCheck(allTransactions, tx["txid"] as String)) { - tx["address"] = txHash["address"]; + tx["address"] = await isar.addresses + .filter() + .valueEqualTo(txHash["address"] as String) + .findFirst(); tx["height"] = txHash["height"]; allTransactions.add(tx); }