short delay after input the last PIN number

This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-08 03:11:41 -03:00
parent f6bb8d3ebd
commit 2f157fe48a
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.services')
.factory('pinService', function($rootScope, localstorageService) {
.factory('pinService', function($rootScope, $timeout, localstorageService) {
var KEY = 'pinDATA';
var SALT = '4gllotIKguqi0EkIslC0';
@ -58,7 +58,9 @@ angular.module('copayApp.services')
this['_' + name] = newValue;
scope.error = null;
if (newValue && newValue.length == 4) {
return cb(newValue);
$timeout(function() {
return cb(newValue);
}, 30);
}
},
enumerable: true,