fix config.lock options by default
This commit is contained in:
parent
f75b43f21e
commit
ef0addc29d
2 changed files with 10 additions and 8 deletions
|
|
@ -15,6 +15,7 @@ angular.module('copayApp.controllers').controller('pinController', function($sta
|
|||
|
||||
$scope.$on("$ionicView.enter", function(event) {
|
||||
configService.whenAvailable(function(config) {
|
||||
if (!config.lock) return;
|
||||
$scope.bannedUntil = config.lock.bannedUntil || null;
|
||||
if ($scope.bannedUntil) {
|
||||
var now = Math.floor(Date.now() / 1000);
|
||||
|
|
@ -156,12 +157,13 @@ angular.module('copayApp.controllers').controller('pinController', function($sta
|
|||
|
||||
function saveSettings(method, value) {
|
||||
var config = configService.getSync();
|
||||
var attempts = config.lock && config.lock.attempts ? config.lock.attempts : 0;
|
||||
var opts = {
|
||||
lock: {
|
||||
method: method || '',
|
||||
value: value || '',
|
||||
bannedUntil: null,
|
||||
attempts: config.lock.attempts + 1,
|
||||
attempts: attempts + 1,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue