Refactory get balance 's methods
This commit is contained in:
parent
e88c80bc3e
commit
f55d243bed
5 changed files with 24 additions and 26 deletions
|
|
@ -8,7 +8,7 @@ angular.module('copay.controllerUtils').factory('controllerUtils', function ($ro
|
|||
$rootScope.wallet = w;
|
||||
|
||||
// Initial getBalance
|
||||
$rootScope.wallet.getBalance(function(balance) {
|
||||
$rootScope.wallet.getTotalBalance(function(balance) {
|
||||
$rootScope.totalBalance = balance;
|
||||
$rootScope.$digest();
|
||||
});
|
||||
|
|
@ -34,7 +34,7 @@ angular.module('copay.controllerUtils').factory('controllerUtils', function ($ro
|
|||
addrs.forEach(function(addr) {
|
||||
socket.on(addr, function(txid) {
|
||||
console.log('Received!', txid);
|
||||
$rootScope.wallet.getBalance(function(balance) {
|
||||
$rootScope.wallet.getTotalBalance(function(balance) {
|
||||
scope.$apply(function() {
|
||||
$rootScope.totalBalance = balance;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue