diff --git a/js/controllers/createProfile.js b/js/controllers/createProfile.js
index cb16a0559..a34ad8796 100644
--- a/js/controllers/createProfile.js
+++ b/js/controllers/createProfile.js
@@ -41,13 +41,6 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
$scope.passwordStrength = null;
_firstpin = null;
-
- $scope.setPinForm.newpin.$setViewValue('');
- $scope.setPinForm.newpin.$render();
- $scope.setPinForm.repeatpin.$setViewValue('');
- $scope.setPinForm.repeatpin.$render();
- $scope.setPinForm.$setPristine();
-
$scope.error = 'Entered PINs were not equal. Try again';
$timeout(function() {
$scope.$digest();
@@ -79,7 +72,6 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
_credentials = null;
$scope.askForPin = 0;
$rootScope.hasPin = true;
- $rootScope.starting = null;
$scope.createDefaultWallet();
});
}, 100);
@@ -123,8 +115,10 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
/* Last step. Will emit after creation so the UX gets updated */
$scope.createDefaultWallet = function() {
$rootScope.hideNavigation = false;
+ $rootScope.starting = true;
identityService.createDefaultWallet(function(err) {
$scope.askForPin = 0;
+ $rootScope.starting = null;
if (err) {
var msg = err.toString();
@@ -143,10 +137,8 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
preconditions.checkArgument(_.isString(password));
$rootScope.hideNavigation = false;
- $rootScope.starting = true;
identityService.create(emailOrUsername, password, function(err) {
- $rootScope.starting = null;
$scope.error = null;
if (err) {
var msg = err.toString();
@@ -162,6 +154,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
} else {
// mobile
if ($scope.isMobile) {
+ $rootScope.starting = null;
_credentials = {
email: emailOrUsername,
password: password,
@@ -206,6 +199,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
$scope.saveSettings(function(err) {
preconditions.checkState(!err, err);
+ $rootScope.starting = true;
$scope._doCreateProfile($scope.userOrEmail, form.password.$modelValue, function(err) {
$timeout(function() {
diff --git a/js/services/identityService.js b/js/services/identityService.js
index 7429c3727..9ae9c6983 100644
--- a/js/services/identityService.js
+++ b/js/services/identityService.js
@@ -323,7 +323,9 @@ angular.module('copayApp.services')
if ($rootScope.iden) {
$rootScope.signingOut = true;
$rootScope.iden.close(function() { // Will trigger 'closed'
- $rootScope.signingOut = false;
+ $timeout(function() {
+ $rootScope.signingOut = null;
+ }, 100);
}); // Will trigger 'closed'
}
};
diff --git a/views/createProfile.html b/views/createProfile.html
index 443803d91..fa970ea3d 100644
--- a/views/createProfile.html
+++ b/views/createProfile.html
@@ -205,39 +205,38 @@
-