correctly assign sentTxid when proposal is broadcasted

This commit is contained in:
Ivan Socolsky 2014-10-30 16:38:08 -03:00
parent 9914fbce12
commit 05e836424a
2 changed files with 5 additions and 4 deletions

View File

@ -72,6 +72,7 @@ angular.module('copayApp.controllers').controller('HistoryController',
}
$scope.getShortNetworkName = function() {
var w = $rootScope.wallet;
return w.getNetworkName().substring(0, 4);
};
$scope.amountAlternative = function(amount, txIndex, cb) {

View File

@ -442,7 +442,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);
});
};
@ -477,10 +477,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');
}
}