mirror of https://github.com/BTCPrivate/copay.git
correctly assign sentTxid when proposal is broadcasted
This commit is contained in:
parent
9914fbce12
commit
05e836424a
|
@ -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) {
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue