fix txid response

This commit is contained in:
Matias Alejo Garcia 2014-10-01 11:08:56 -03:00
commit 1c7c5b39ff
2 changed files with 3 additions and 3 deletions

View file

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

View file

@ -341,7 +341,7 @@ Wallet.prototype._checkSentTx = function(ntxid, cb) {
this.blockchain.getTransaction(txid, function(err, tx) { this.blockchain.getTransaction(txid, function(err, tx) {
if (err) return cb(false); if (err) return cb(false);
cb(ret); return cb(ret);
}); });
}; };