From dd724a613550dfd663f45bb5dc4c8344adf67030 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 21 Aug 2014 14:28:02 -0400 Subject: [PATCH] add store / refrest --- js/controllers/more.js | 6 ++++-- js/models/core/Wallet.js | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/controllers/more.js b/js/controllers/more.js index a6ece95e2..130533657 100644 --- a/js/controllers/more.js +++ b/js/controllers/more.js @@ -27,12 +27,14 @@ angular.module('copayApp.controllers').controller('MoreController', $scope.purge = function(deleteAll) { var w = $rootScope.wallet; var removed = w.purgeTxProposals(deleteAll); - notification.info('Tx Proposals Purged', removed + ' transactions proposals were purged'); + if (removed){ + controllerUtils.updateBalance(); + } + notification.info('Tx Proposals Purged', removed + ' transaction proposal purged'); }; $scope.updateIndexes = function() { var w = $rootScope.wallet; - notification.info('Scaning for transactions','Using derived addresses from your wallet'); w.updateIndexes(function(err) { notification.info('Scan Ended', 'Updating balance'); diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index d53334927..e3ca1d872 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -714,6 +714,7 @@ Wallet.prototype.purgeTxProposals = function(deleteAll) { } else { this.txProposals.deletePending(this.maxRejectCount()); } + this.store(); var n = this.txProposals.length(); return m-n;