adding test modal for pin
This commit is contained in:
parent
d1a2c2bbbf
commit
9bb12e91f5
5 changed files with 127 additions and 53 deletions
12
src/js/controllers/modals/pintest.js
Normal file
12
src/js/controllers/modals/pintest.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('pinTestController', function($scope, applicationService) {
|
||||
|
||||
$scope.goodPin = function() {
|
||||
applicationService.successfullUnlocked = true;
|
||||
$scope.pintestview.hide();
|
||||
};
|
||||
|
||||
$scope.badPin = function() {};
|
||||
|
||||
});
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('pinController', function($state, $interval, $stateParams, $ionicHistory, $timeout, $scope, $log, configService, appConfigService) {
|
||||
angular.module('copayApp.controllers').controller('pinController', function($state, $interval, $stateParams, $ionicHistory, $timeout, $scope, $log, configService, appConfigService, applicationService) {
|
||||
var ATTEMPT_LIMIT = 3;
|
||||
var ATTEMPT_LOCK_OUT_TIME = 5 * 60;
|
||||
var currentPin;
|
||||
|
|
@ -126,7 +126,12 @@ angular.module('copayApp.controllers').controller('pinController', function($sta
|
|||
}
|
||||
break;
|
||||
case 'check':
|
||||
if (isMatch(currentPin)) return $scope.close();
|
||||
if (isMatch(currentPin)) {
|
||||
console.log("##################################### CHECKING");
|
||||
applicationService.successfullUnlocked = true;
|
||||
$scope.close();
|
||||
return;
|
||||
}
|
||||
showError();
|
||||
checkAttempts();
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue