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
parent 4a6c258f68
commit fcdaddd358
1 changed files with 8 additions and 2 deletions

View File

@ -40,6 +40,7 @@ angular.module('copayApp.services')
} else {
scope.error = 'Unknown error when connecting Insight Server';
}
$rootScope.starting = false;
$timeout(function() {
$rootScope.$digest()
}, 1);
@ -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,6 +87,7 @@ angular.module('copayApp.services')
} else {
scope.error = 'Unknown error';
}
$rootScope.starting = false;
$timeout(function() {
$rootScope.$digest()
}, 1);