fix pending LtC transaction (#1887)
Some checks are pending
Cache Dependencies / test (push) Waiting to run

This commit is contained in:
Serhii 2024-12-17 15:19:13 +02:00 committed by GitHub
parent e4deb8455a
commit b1751f1fd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -758,6 +758,13 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
if (!mwebEnabled) return false; if (!mwebEnabled) return false;
if (!tx.isPending) 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 = <String>[], target = <String>{}; final outputId = <String>[], target = <String>{};
final isHash = RegExp(r'^[a-f0-9]{64}$').hasMatch; final isHash = RegExp(r'^[a-f0-9]{64}$').hasMatch;
final spendingOutputIds = tx.inputAddresses?.where(isHash) ?? []; final spendingOutputIds = tx.inputAddresses?.where(isHash) ?? [];