Added call from UX

This commit is contained in:
Ivan Socolsky 2014-09-03 11:27:58 -03:00
parent ea394de56a
commit 55aa4e8f68
2 changed files with 6 additions and 3 deletions

View File

@ -1528,6 +1528,7 @@ Wallet.prototype.getUnspent = function(cb) {
Wallet.prototype.removeTxWithSpentInputs = function(cb) {
var self = this;
cb = cb || function () {};
var txps = this.getTxProposals();
var inputs = [];
@ -1540,9 +1541,7 @@ Wallet.prototype.removeTxWithSpentInputs = function(cb) {
return;
this.blockchain.getUnspent(this.getAddressesStr(), function(err, unspentList) {
if (err) {
return cb(err);
}
if (err) return cb(err);
unspentList.forEach(function (unspent) {
inputs.forEach(function (input) {
@ -1558,6 +1557,8 @@ Wallet.prototype.removeTxWithSpentInputs = function(cb) {
self.emit('txProposalsUpdated');
self.store();
cb(null);
});
};

View File

@ -166,6 +166,8 @@ angular.module('copayApp.services')
if (!w) return root.onErrorDigest();
if (!w.isReady()) return;
w.removeTxWithSpentInputs();
$rootScope.balanceByAddr = {};
$rootScope.updatingBalance = true;