commit
2d5b5318b8
4 changed files with 27 additions and 22 deletions
|
|
@ -45,14 +45,18 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
preconditions.checkState(_credentials && _credentials.email);
|
||||
$scope.loading = true;
|
||||
|
||||
pinService.save(pin, _credentials.email, _credentials.password, function(err) {
|
||||
_credentials.password = '';
|
||||
_credentials = null;
|
||||
$scope.askForPin = 0;
|
||||
$rootScope.hasPin = true;
|
||||
$scope.loading = null;
|
||||
$scope.createDefaultWallet();
|
||||
});
|
||||
$timeout(function() {
|
||||
$rootScope.$digest();
|
||||
|
||||
pinService.save(pin, _credentials.email, _credentials.password, function(err) {
|
||||
_credentials.password = '';
|
||||
_credentials = null;
|
||||
$scope.askForPin = 0;
|
||||
$rootScope.hasPin = true;
|
||||
$scope.loading = null;
|
||||
$scope.createDefaultWallet();
|
||||
});
|
||||
}, 1);
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -163,7 +167,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
return;
|
||||
}
|
||||
$scope.saveSettings(function(err) {
|
||||
preconditions.checkState(!err,err);
|
||||
preconditions.checkState(!err, err);
|
||||
|
||||
$scope._doCreateProfile($scope.userOrEmail, form.password.$modelValue, function(err) {
|
||||
$timeout(function() {
|
||||
|
|
|
|||
|
|
@ -61,18 +61,20 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
|||
$scope.error = 'Please enter the required fields';
|
||||
return;
|
||||
}
|
||||
$scope.loading = true;
|
||||
$rootScope.starting = true;
|
||||
|
||||
var credentials = pinService.get(pin, function(err, credentials) {
|
||||
if (err || !credentials) {
|
||||
$rootScope.starting = false;
|
||||
$scope.loading = null;
|
||||
$scope.error = 'Wrong PIN';
|
||||
return;
|
||||
}
|
||||
$scope.open(credentials.email, credentials.password);
|
||||
});
|
||||
$timeout(function() {
|
||||
$rootScope.$digest();
|
||||
var credentials = pinService.get(pin, function(err, credentials) {
|
||||
if (err || !credentials) {
|
||||
$rootScope.starting = false;
|
||||
$scope.loading = null;
|
||||
$scope.error = 'Wrong PIN';
|
||||
return;
|
||||
}
|
||||
$scope.open(credentials.email, credentials.password);
|
||||
});
|
||||
},1);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ angular.module('copayApp.services')
|
|||
root.restart = function() {
|
||||
if (isCordova) {
|
||||
$rootScope.iden = $rootScope.wallet = undefined;
|
||||
go.go('/');
|
||||
go.path('/');
|
||||
$timeout(function(){
|
||||
$rootScope.$digest();
|
||||
},1);
|
||||
|
|
|
|||
|
|
@ -109,8 +109,7 @@
|
|||
</div>
|
||||
<div class="large-6 medium-6 small-6 columns text-right">
|
||||
<button translate type="submit" class="button primary radius expand m0"
|
||||
ng-disabled="pinForm.$invalid || error || loading">
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner" ng-show="loading"></i>
|
||||
ng-disabled="pinForm.$invalid || error">
|
||||
Sign in
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue