wallet details refactor
This commit is contained in:
parent
e3076d18ab
commit
8aefbe25b3
9 changed files with 703 additions and 706 deletions
|
|
@ -88,11 +88,9 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
|
||||
self.updateAllClients = function() {
|
||||
var txps = [];
|
||||
var wallets = profileService.getWallets();
|
||||
var l = wallets.length,
|
||||
i = 0;
|
||||
var i = $scope.wallets.length;
|
||||
|
||||
lodash.each(wallets, function(wallet) {
|
||||
lodash.each($scope.wallets, function(wallet) {
|
||||
walletService.getStatus(wallet, {}, function(err, status) {
|
||||
if (err) {
|
||||
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
|
||||
|
|
@ -101,9 +99,10 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
if (status.pendingTxps && status.pendingTxps[0]) {
|
||||
txps = txps.concat(status.pendingTxps);
|
||||
}
|
||||
if (++i == l) {
|
||||
if (--i == 0) {
|
||||
setPendingTxps(txps);
|
||||
}
|
||||
wallet.status = status;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue