diff --git a/lib/explorer.js b/lib/explorer.js index 56908e2..b5a4f41 100644 --- a/lib/explorer.js +++ b/lib/explorer.js @@ -284,7 +284,14 @@ module.exports = { module.exports.syncLoop(vout.length, function (loop) { var i = loop.iteration(); // make sure vout has an address - if (vout[i].scriptPubKey.type != 'nonstandard' && vout[i].scriptPubKey.type != 'nulldata') { + /* - PATCH FOR ERRORS IN TX INDEX - + rbtgit commented on Feb 24, 2018 + I've had this issue and fixed it by changing the following line in explorer.js: + if (vout[i].scriptPubKey.type != 'nonstandard' && vout[i].scriptPubKey.type != 'nulldata') { + to + if (vout[i].scriptPubKey.type != 'nonstandard' && vout[i].scriptPubKey.type != 'nulldata' && vout[i].scriptPubKey.hasOwnProperty("addresses")) { + */ + if (vout[i].scriptPubKey.type != 'nonstandard' && vout[i].scriptPubKey.type != 'nulldata' && vout[i].scriptPubKey.hasOwnProperty("addresses")) { // check if vout address is unique, if so add it array, if not add its amount to existing index //console.log('vout:' + i + ':' + txid); module.exports.is_unique(arr_vout, vout[i].scriptPubKey.addresses[0], function(unique, index) {