If there is an error, reset global variable "starting"

This commit is contained in:
Gustavo Maximiliano Cortez 2014-11-17 00:36:41 -03:00
commit fcdaddd358

View file

@ -40,6 +40,7 @@ angular.module('copayApp.services')
} else { } else {
scope.error = 'Unknown error when connecting Insight Server'; scope.error = 'Unknown error when connecting Insight Server';
} }
$rootScope.starting = false;
$timeout(function() { $timeout(function() {
$rootScope.$digest() $rootScope.$digest()
}, 1); }, 1);
@ -57,6 +58,10 @@ angular.module('copayApp.services')
if (err || !wallet) { if (err || !wallet) {
copay.logger.debug(err); copay.logger.debug(err);
scope.error = 'Could not create default wallet'; scope.error = 'Could not create default wallet';
$rootScope.starting = false;
$timeout(function() {
$rootScope.$digest()
}, 1);
return; return;
} }
controllerUtils.bindProfile(scope, iden, wallet.id); controllerUtils.bindProfile(scope, iden, wallet.id);
@ -82,6 +87,7 @@ angular.module('copayApp.services')
} else { } else {
scope.error = 'Unknown error'; scope.error = 'Unknown error';
} }
$rootScope.starting = false;
$timeout(function() { $timeout(function() {
$rootScope.$digest() $rootScope.$digest()
}, 1); }, 1);