Fix PIN create. Fix spinner when creating profile
This commit is contained in:
parent
7a4e3565a8
commit
5bc7fcd8d0
3 changed files with 27 additions and 32 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue