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) {
|
||||
$ionicNavBarDelegate.showBar(true);
|
||||
updateAllWallets();
|
||||
|
||||
$timeout(function() {
|
||||
updateAllWallets(function() {
|
||||
profileService.initBitcoinCoreDisplay();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
addressbookService.list(function(err, ab) {
|
||||
if (err) $log.error(err);
|
||||
|
|
@ -215,7 +213,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
})
|
||||
};
|
||||
|
||||
var updateAllWallets = function() {
|
||||
var updateAllWallets = function(cb) {
|
||||
var wallets = [];
|
||||
$scope.walletsBtc = profileService.getWallets({coin: 'btc'});
|
||||
$scope.walletsBch = profileService.getWallets({coin: 'bch'});
|
||||
|
|
@ -249,6 +247,9 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
}
|
||||
if (++j == i) {
|
||||
updateTxps();
|
||||
if (cb !== undefined) {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue