compute balance for all wallets
This commit is contained in:
parent
0ff67f69ef
commit
1f45ecfdc8
3 changed files with 78 additions and 52 deletions
|
|
@ -81,7 +81,18 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
|
|||
$scope.walletSelection = false;
|
||||
controllerUtils.setFocusedWallet(wid);
|
||||
};
|
||||
|
||||
$scope.toggleWalletSelection = function() {
|
||||
$scope.walletSelection = !$scope.walletSelection;
|
||||
$scope.wallets = [];
|
||||
var wids = _.pluck($rootScope.iden.listWallets(), 'id');
|
||||
_.each(wids, function(wid) {
|
||||
if (controllerUtils.isFocusedWallet(wid)) return;
|
||||
var w = $rootScope.iden.getOpenWallet(wid);
|
||||
$scope.wallets.push(w);
|
||||
controllerUtils.updateBalance(w, function(err, res) {
|
||||
if (err) return;
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue