fixes handling wrong txs

This commit is contained in:
Matias Alejo Garcia 2014-11-02 22:41:04 -03:00
commit 22ef1bb3f3
2 changed files with 6 additions and 3 deletions

View file

@ -256,7 +256,7 @@ Insight.prototype.broadcast = function(rawtx, cb) {
this.requestPost('/api/tx/send', {
rawtx: rawtx
}, function(err, res, body) {
if (err || res.status != 200) cb(err || res);
if (err || res.statusCode != 200) cb(err || body);
cb(null, body ? body.txid : null);
});
};