loading first wallet before view enter, added conditional to ignore change in wallet function calls if wallet is the same

This commit is contained in:
Jamal Jackson 2016-10-14 16:30:54 -04:00
parent 085be94ab1
commit f283c70e0a
1 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$log.debug('No wallet provided');
return;
}
if (wallet == $scope.wallet) {
$log.debug('No change in wallet');
return;
}
$scope.wallet = wallet;
$log.debug('Wallet changed: ' + wallet.name);
$timeout(function() {
@ -83,5 +87,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.wallets = profileService.getWallets();
$scope.wallet = $scope.wallets[0];
$scope.setAddress();
});
});