remove many unnecesary digests

This commit is contained in:
Manuel Araoz 2014-05-09 15:17:24 -03:00
commit f764c743e4
4 changed files with 1 additions and 5 deletions

View file

@ -11,7 +11,6 @@ angular.module('copay.addresses').controller('AddressesController',
w.generateAddress();
controllerUtils.updateBalance(function() {
$scope.loading = false;
$rootScope.$digest();
});
};

View file

@ -46,7 +46,6 @@ angular.module('copay.header').controller('HeaderController',
var w = $rootScope.wallet;
w.connectToAll();
controllerUtils.updateBalance(function() {
$rootScope.$digest();
});
};

View file

@ -319,7 +319,6 @@ Wallet.prototype.generateAddress = function(isChange) {
var addr = this.publicKeyRing.generateAddress(isChange);
this.sendPublicKeyRing();
this.store();
this.emit('refresh');
return addr;
};

View file

@ -80,7 +80,6 @@ angular.module('copay.controllerUtils')
});
w.on('refresh', function() {
root.updateBalance(function() {
$rootScope.$digest();
});
$rootScope.$digest();
});
@ -111,6 +110,7 @@ angular.module('copay.controllerUtils')
$rootScope.balanceByAddr = balanceByAddr;
$rootScope.selectedAddr = $rootScope.addrInfos[0].address.toString();
$rootScope.loading = false;
$rootScope.$digest();
if (cb) cb();
});
w.getBalance(true, function(balance) {
@ -135,7 +135,6 @@ angular.module('copay.controllerUtils')
Socket.on(addr, function(txid) {
console.log('Received!', txid);
root.updateBalance(function() {
$rootScope.$digest();
});
});
});