From b1751f1fd68743d8369ca7c20c073484b0d31267 Mon Sep 17 00:00:00 2001 From: Serhii Date: Tue, 17 Dec 2024 15:19:13 +0200 Subject: [PATCH] fix pending LtC transaction (#1887) --- cw_bitcoin/lib/litecoin_wallet.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index f7cc20bcd..79dcbf415 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -758,6 +758,13 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { if (!mwebEnabled) return false; if (!tx.isPending) return false; + final isMwebTx = (tx.inputAddresses?.any((addr) => addr.contains("mweb")) ?? false) || + (tx.outputAddresses?.any((addr) => addr.contains("mweb")) ?? false); + + if (!isMwebTx) { + return false; + } + final outputId = [], target = {}; final isHash = RegExp(r'^[a-f0-9]{64}$').hasMatch; final spendingOutputIds = tx.inputAddresses?.where(isHash) ?? [];