Raise time to lock to 30 seconds

This commit is contained in:
Diego Mello 2020-04-24 17:05:15 -03:00
parent bb09aa09c7
commit 4739963eb6
2 changed files with 2 additions and 4 deletions

View File

@ -6,4 +6,4 @@ export const LOCAL_AUTHENTICATE_EMITTER = 'LOCAL_AUTHENTICATE';
export const PASSCODE_LENGTH = 6;
export const MAX_ATTEMPTS = 6;
export const TIME_TO_LOCK = 10000;
export const TIME_TO_LOCK = 30000;

View File

@ -8,7 +8,7 @@ import sharedStyles from '../../views/Styles';
import { themes } from '../../constants/colors';
import { resetAttempts } from '../../utils/localAuthentication';
import { TYPE } from './constants';
import { getLockedUntil } from './utils';
import { getLockedUntil, getDiff } from './utils';
import I18n from '../../i18n';
const styles = StyleSheet.create({
@ -32,8 +32,6 @@ const styles = StyleSheet.create({
}
});
const getDiff = t => new Date(t) - new Date();
const Timer = ({ time, theme, setStatus }) => {
const calcTimeLeft = () => {
const diff = getDiff(time);