From fcdaddd358caaaad340ed4c2890816600c52ce93 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 17 Nov 2014 00:36:41 -0300 Subject: [PATCH] If there is an error, reset global variable "starting" --- js/services/identityService.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/services/identityService.js b/js/services/identityService.js index 6c019f5d9..6c54b189d 100644 --- a/js/services/identityService.js +++ b/js/services/identityService.js @@ -40,9 +40,10 @@ angular.module('copayApp.services') } else { scope.error = 'Unknown error when connecting Insight Server'; } + $rootScope.starting = false; $timeout(function() { $rootScope.$digest() - }, 1); + }, 1); return; } var walletOptions = { @@ -57,6 +58,10 @@ angular.module('copayApp.services') if (err || !wallet) { copay.logger.debug(err); scope.error = 'Could not create default wallet'; + $rootScope.starting = false; + $timeout(function() { + $rootScope.$digest() + }, 1); return; } controllerUtils.bindProfile(scope, iden, wallet.id); @@ -82,9 +87,10 @@ angular.module('copayApp.services') } else { scope.error = 'Unknown error'; } + $rootScope.starting = false; $timeout(function() { $rootScope.$digest() - }, 1); + }, 1); } else { var firstWallet = iden.getLastFocusedWallet(); controllerUtils.bindProfile(scope, iden, firstWallet);