Update: Adds a callback for updateAllWallets
This commit is contained in:
parent
1615034bbc
commit
772f3bfb35
1 changed files with 6 additions and 5 deletions
|
|
@ -83,11 +83,9 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
|
|
||||||
$scope.$on("$ionicView.enter", function(event, data) {
|
$scope.$on("$ionicView.enter", function(event, data) {
|
||||||
$ionicNavBarDelegate.showBar(true);
|
$ionicNavBarDelegate.showBar(true);
|
||||||
updateAllWallets();
|
updateAllWallets(function() {
|
||||||
|
|
||||||
$timeout(function() {
|
|
||||||
profileService.initBitcoinCoreDisplay();
|
profileService.initBitcoinCoreDisplay();
|
||||||
}, 1000);
|
});
|
||||||
|
|
||||||
addressbookService.list(function(err, ab) {
|
addressbookService.list(function(err, ab) {
|
||||||
if (err) $log.error(err);
|
if (err) $log.error(err);
|
||||||
|
|
@ -215,7 +213,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
var updateAllWallets = function() {
|
var updateAllWallets = function(cb) {
|
||||||
var wallets = [];
|
var wallets = [];
|
||||||
$scope.walletsBtc = profileService.getWallets({coin: 'btc'});
|
$scope.walletsBtc = profileService.getWallets({coin: 'btc'});
|
||||||
$scope.walletsBch = profileService.getWallets({coin: 'bch'});
|
$scope.walletsBch = profileService.getWallets({coin: 'bch'});
|
||||||
|
|
@ -249,6 +247,9 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
}
|
}
|
||||||
if (++j == i) {
|
if (++j == i) {
|
||||||
updateTxps();
|
updateTxps();
|
||||||
|
if (cb !== undefined) {
|
||||||
|
cb();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue