bitcoind: account for scriptPubKey.addresses not always being set
This commit is contained in:
parent
88c15f6844
commit
f38fa1324f
@ -1898,7 +1898,7 @@ Bitcoin.prototype.getDetailedTransaction = function(txid, callback) {
|
||||
var out = result.vout[outputIndex];
|
||||
tx.outputSatoshis += out.valueSat;
|
||||
var address = null;
|
||||
if (out.scriptPubKey.addresses.length === 1) {
|
||||
if (out.scriptPubKey && out.scriptPubKey.addresses && out.scriptPubKey.addresses.length === 1) {
|
||||
address = out.scriptPubKey.addresses[0];
|
||||
}
|
||||
tx.outputs.push({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user