mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-28 21:44:13 +02:00
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:
@@ -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...)
|
||||||
|
Reference in New Issue
Block a user