fix for 0 records retrieved
This commit is contained in:
parent
7243fcd32c
commit
3e279e74f2
|
@ -47,8 +47,8 @@ function getTransactionsInsight(url, addresses, from, to, cb) {
|
|||
}, function(err, res, txs) {
|
||||
if (err || res.statusCode != 200) return cb(err || res);
|
||||
// NOTE: Whenever Insight breaks communication with bitcoind, it returns invalid data but no error code.
|
||||
if (!_.isArray(txs) || _.compact(txs).length == 0) return cb(new Error('Could not retrieve transactions from blockchain'));
|
||||
|
||||
if (!_.isArray(txs) || (txs.length != _.compact(txs).length)) return cb(new Error('Could not retrieve transactions from blockchain'));
|
||||
|
||||
return cb(null, txs);
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue