From af628dde9be0a3d8672a9a6e6dbb997f8127dd4e Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Fri, 9 May 2014 15:39:02 -0300 Subject: [PATCH] reduce calls to insight in address gen --- js/controllers/addresses.js | 3 --- js/services/controllerUtils.js | 7 +++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/js/controllers/addresses.js b/js/controllers/addresses.js index 36bc1d2e0..79a39a125 100644 --- a/js/controllers/addresses.js +++ b/js/controllers/addresses.js @@ -9,9 +9,6 @@ angular.module('copay.addresses').controller('AddressesController', $scope.newAddr = function() { $scope.loading = true; w.generateAddress(); - controllerUtils.updateBalance(function() { - $scope.loading = false; - }); }; $scope.selectAddr = function(addr) { diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index 6f2e74a68..f065080f2 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -79,8 +79,8 @@ angular.module('copay.controllerUtils') $rootScope.$digest(); }); w.on('refresh', function() { - root.updateBalance(function() { - }); + alert('refresh'); + root.updateBalance(); $rootScope.$digest(); }); w.on('openError', root.onErrorDigest); @@ -134,8 +134,7 @@ angular.module('copay.controllerUtils') addrs.forEach(function(addr) { Socket.on(addr, function(txid) { console.log('Received!', txid); - root.updateBalance(function() { - }); + root.updateBalance(); }); }); };