Adapting totalBalance to new generic controller

This commit is contained in:
Gustavo Cortez 2014-04-17 12:03:18 -03:00
parent 2454d930fa
commit 5d83d180da
1 changed files with 6 additions and 2 deletions

View File

@ -6,11 +6,15 @@ angular.module('copay.controllerUtils').factory('controllerUtils', function ($ro
w.on('created', function() {
$location.path('peer');
$rootScope.wallet = w;
$rootScope.$digest();
// Initial getBalance
$rootScope.wallet.getBalance(function(balance) {
$rootScope.totalBalance = balance;
$rootScope.$digest();
});
});
w.on('refresh', function() {
console.log('[controllerUtils.js] RECEIVED REFRESH'); //TODO
$rootScope.$digest();
});
w.on('openError', function(){