fix pending LtC transaction (#1887)
Serhii committed
Dec 17, 2024 at 15:19 UTC
b1751f1fd68743d8369ca7c20c073484b0d31267
1 file changed
+7
cw_bitcoin/lib/litecoin_wallet.dart
+7
@@ -758,6 +758,13 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
758
if (!mwebEnabled) return false;
759
if (!tx.isPending) return false;
760
761
+ final isMwebTx = (tx.inputAddresses?.any((addr) => addr.contains("mweb")) ?? false) ||
762
+ (tx.outputAddresses?.any((addr) => addr.contains("mweb")) ?? false);
763
+
764
+ if (!isMwebTx) {
765
+ return false;
766
+ }
767
+
768
final outputId = <String>[], target = <String>{};
769
final isHash = RegExp(r'^[a-f0-9]{64}$').hasMatch;
770
final spendingOutputIds = tx.inputAddresses?.where(isHash) ?? [];