Initial getBalance of all your addresses. Socket-io that listening if your address receives btc.

Known bug: if you add new the address you can to recall socket-io. Socket-io should be listening on headerController.
This commit is contained in:
Gustavo Cortez 2014-04-17 06:43:30 -03:00
commit eaa1bc37e0
7 changed files with 54 additions and 10 deletions

View file

@ -17,6 +17,14 @@ angular.module('copay.signin').controller('SigninController',
w.on('created', function() {
$location.path('peer');
$rootScope.wallet = w;
// Initial getBalance
$rootScope.wallet.getBalance(function(balance) {
$scope.$apply(function() {
$rootScope.totalBalance = balance;
});
});
$rootScope.$digest();
});
w.on('refresh', function() {