commit
49de272cbd
|
@ -44,9 +44,12 @@ function getTransactionsInsight(url, addresses, from, to, cb) {
|
||||||
json: {
|
json: {
|
||||||
addrs: [].concat(addresses).join(',')
|
addrs: [].concat(addresses).join(',')
|
||||||
}
|
}
|
||||||
}, function(err, res, body) {
|
}, function(err, res, txs) {
|
||||||
if (err || res.statusCode != 200) return cb(err || res);
|
if (err || res.statusCode != 200) return cb(err || res);
|
||||||
return cb(null, body);
|
// NOTE: Whenever Insight breaks communication with bitcoind, it returns invalid data but no error code.
|
||||||
|
if (!_.isArray(txs) || (txs.length != _.compact(txs).length)) return cb(new Error('Could not retrieve transactions from blockchain'));
|
||||||
|
|
||||||
|
return cb(null, txs);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1231,7 +1231,9 @@ WalletService.prototype.startScan = function(opts, cb) {
|
||||||
self.scan(opts, scanFinished);
|
self.scan(opts, scanFinished);
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
return cb(null, {started: true});
|
return cb(null, {
|
||||||
|
started: true
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue