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:
parent
864156ed4f
commit
eaa1bc37e0
7 changed files with 54 additions and 10 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue