From a85c4feb17486fc0a79ac52d56031d9b4b379689 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Tue, 25 Aug 2020 11:21:29 -0700 Subject: [PATCH] btcwallet: skip unsupported addresses in ListTransasctionDetails A transaction with an unsupported address would prevent the method from returning any other transactions and would instead return an error. --- lnwallet/btcwallet/btcwallet.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lnwallet/btcwallet/btcwallet.go b/lnwallet/btcwallet/btcwallet.go index 94b413233..115781812 100644 --- a/lnwallet/btcwallet/btcwallet.go +++ b/lnwallet/btcwallet/btcwallet.go @@ -558,7 +558,9 @@ func minedTransactionsToDetails( txOut.PkScript, chainParams, ) if err != nil { - return nil, err + // Skip any unsupported addresses to prevent + // other transactions from not being returned. + continue } destAddresses = append(destAddresses, outAddresses...) @@ -607,7 +609,9 @@ func unminedTransactionsToDetail( _, outAddresses, _, err := txscript.ExtractPkScriptAddrs(txOut.PkScript, chainParams) if err != nil { - return nil, err + // Skip any unsupported addresses to prevent other + // transactions from not being returned. + continue } destAddresses = append(destAddresses, outAddresses...)