Refactory get balance 's methods
This commit is contained in:
parent
e88c80bc3e
commit
f55d243bed
5 changed files with 24 additions and 26 deletions
|
|
@ -9,8 +9,7 @@ angular.module('copay.home').controller('HomeController',
|
|||
|
||||
var _getBalance = function() {
|
||||
$scope.addrs.forEach(function(addr) {
|
||||
$rootScope.wallet.blockchain.listUnspent([addr], function(unspent) {
|
||||
var balance = $rootScope.wallet.blockchain.getBalance(unspent);
|
||||
$rootScope.wallet.getBalance([addr], function(balance) {
|
||||
$scope.addrBalance[addr] = balance;
|
||||
$scope.$digest();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue