mirror of https://github.com/BTCPrivate/copay.git
Adapting totalBalance to new generic controller
This commit is contained in:
parent
2454d930fa
commit
5d83d180da
|
@ -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(){
|
||||
|
|
Loading…
Reference in New Issue