Merge pull request #1612 from isocolsky/fixes

Correctly assign sentTxid when proposal is broadcasted
This commit is contained in:
Matias Alejo Garcia 2014-10-30 17:39:40 -03:00
commit 6edaf9f1a4
3 changed files with 7 additions and 5 deletions

View file

@ -428,7 +428,7 @@ Wallet.prototype._checkSentTx = function(ntxid, cb) {
this.blockchain.getTransaction(txid, function(err, tx) {
if (err) return cb(false);
return cb(ret);
return cb(txid);
});
};
@ -463,10 +463,10 @@ Wallet.prototype._onTxProposal = function(senderId, data) {
var tx = m.txp.builder.build();
if (tx.isComplete()) {
this._checkSentTx(m.ntxid, function(ret) {
if (ret) {
this._checkSentTx(m.ntxid, function(txid) {
if (txid) {
if (!m.txp.getSent()) {
m.txp.setSent(m.ntxid);
m.txp.setSent(txid);
self.emitAndKeepAlive('txProposalsUpdated');
}
}