mirror of https://github.com/BTCPrivate/copay.git
Added call from UX
This commit is contained in:
parent
ea394de56a
commit
55aa4e8f68
|
@ -1528,6 +1528,7 @@ Wallet.prototype.getUnspent = function(cb) {
|
||||||
Wallet.prototype.removeTxWithSpentInputs = function(cb) {
|
Wallet.prototype.removeTxWithSpentInputs = function(cb) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
cb = cb || function () {};
|
||||||
var txps = this.getTxProposals();
|
var txps = this.getTxProposals();
|
||||||
|
|
||||||
var inputs = [];
|
var inputs = [];
|
||||||
|
@ -1540,9 +1541,7 @@ Wallet.prototype.removeTxWithSpentInputs = function(cb) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.blockchain.getUnspent(this.getAddressesStr(), function(err, unspentList) {
|
this.blockchain.getUnspent(this.getAddressesStr(), function(err, unspentList) {
|
||||||
if (err) {
|
if (err) return cb(err);
|
||||||
return cb(err);
|
|
||||||
}
|
|
||||||
|
|
||||||
unspentList.forEach(function (unspent) {
|
unspentList.forEach(function (unspent) {
|
||||||
inputs.forEach(function (input) {
|
inputs.forEach(function (input) {
|
||||||
|
@ -1558,6 +1557,8 @@ Wallet.prototype.removeTxWithSpentInputs = function(cb) {
|
||||||
|
|
||||||
self.emit('txProposalsUpdated');
|
self.emit('txProposalsUpdated');
|
||||||
self.store();
|
self.store();
|
||||||
|
|
||||||
|
cb(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -166,6 +166,8 @@ angular.module('copayApp.services')
|
||||||
if (!w) return root.onErrorDigest();
|
if (!w) return root.onErrorDigest();
|
||||||
if (!w.isReady()) return;
|
if (!w.isReady()) return;
|
||||||
|
|
||||||
|
w.removeTxWithSpentInputs();
|
||||||
|
|
||||||
$rootScope.balanceByAddr = {};
|
$rootScope.balanceByAddr = {};
|
||||||
$rootScope.updatingBalance = true;
|
$rootScope.updatingBalance = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue