Merge pull request #4570 from wpaulino/listtransactions-skip-unsupported-addr

btcwallet: skip unsupported addresses in ListTransasctionDetails
This commit is contained in:
Olaoluwa Osuntokun 2020-08-26 15:54:24 -07:00 committed by GitHub
commit 8b894fe321
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -558,7 +558,9 @@ func minedTransactionsToDetails(
txOut.PkScript, chainParams, txOut.PkScript, chainParams,
) )
if err != nil { if err != nil {
return nil, err // Skip any unsupported addresses to prevent
// other transactions from not being returned.
continue
} }
destAddresses = append(destAddresses, outAddresses...) destAddresses = append(destAddresses, outAddresses...)
@ -607,7 +609,9 @@ func unminedTransactionsToDetail(
_, outAddresses, _, err := _, outAddresses, _, err :=
txscript.ExtractPkScriptAddrs(txOut.PkScript, chainParams) txscript.ExtractPkScriptAddrs(txOut.PkScript, chainParams)
if err != nil { if err != nil {
return nil, err // Skip any unsupported addresses to prevent other
// transactions from not being returned.
continue
} }
destAddresses = append(destAddresses, outAddresses...) destAddresses = append(destAddresses, outAddresses...)