reduce calls to insight in address gen

This commit is contained in:
Manuel Araoz 2014-05-09 15:39:02 -03:00
commit af628dde9b
2 changed files with 3 additions and 7 deletions

View file

@ -9,9 +9,6 @@ angular.module('copay.addresses').controller('AddressesController',
$scope.newAddr = function() { $scope.newAddr = function() {
$scope.loading = true; $scope.loading = true;
w.generateAddress(); w.generateAddress();
controllerUtils.updateBalance(function() {
$scope.loading = false;
});
}; };
$scope.selectAddr = function(addr) { $scope.selectAddr = function(addr) {

View file

@ -79,8 +79,8 @@ angular.module('copay.controllerUtils')
$rootScope.$digest(); $rootScope.$digest();
}); });
w.on('refresh', function() { w.on('refresh', function() {
root.updateBalance(function() { alert('refresh');
}); root.updateBalance();
$rootScope.$digest(); $rootScope.$digest();
}); });
w.on('openError', root.onErrorDigest); w.on('openError', root.onErrorDigest);
@ -134,8 +134,7 @@ angular.module('copay.controllerUtils')
addrs.forEach(function(addr) { addrs.forEach(function(addr) {
Socket.on(addr, function(txid) { Socket.on(addr, function(txid) {
console.log('Received!', txid); console.log('Received!', txid);
root.updateBalance(function() { root.updateBalance();
});
}); });
}); });
}; };