add pin fixes
This commit is contained in:
parent
05b6cfa56f
commit
a34171e8cd
3 changed files with 26 additions and 21 deletions
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue