* Reload address list when click on refresh
* Angular error when do not have any address and click on refresh
This commit is contained in:
Gustavo Cortez 2014-05-21 18:53:17 -03:00
commit 61dfec7a0d
4 changed files with 17 additions and 14 deletions

View file

@ -107,10 +107,7 @@ angular.module('copay.controllerUtils')
root.updateBalance = function(cb) {
console.log('Updating balance...');
root.updateAddressList();
var w = $rootScope.wallet;
if ($rootScope.addrInfos.length === 0)
return cb?cb():null;
$rootScope.balanceByAddr = {};
$rootScope.updatingBalance = true;
@ -118,6 +115,7 @@ angular.module('copay.controllerUtils')
$rootScope.totalBalance = balance;
$rootScope.balanceByAddr = balanceByAddr;
$rootScope.availableBalance = safeBalance;
root.updateAddressList();
$rootScope.updatingBalance = false;
console.log('Done updating balance.'); //TODO
return cb?cb():null;