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.
This commit is contained in:
Wilmer Paulino 2020-08-25 11:21:29 -07:00
parent fac3c84806
commit a85c4feb17
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F

@ -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...)