mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 10:34:32 +00:00
only auto-enter pins of length 4 or more
This commit is contained in:
parent
603824a21c
commit
f836136ef0
2 changed files with 2 additions and 2 deletions
|
@ -223,7 +223,7 @@ class _LockscreenViewState extends ConsumerState<LockscreenView> {
|
||||||
final storedPin = await _secureStore.read(key: 'stack_pin');
|
final storedPin = await _secureStore.read(key: 'stack_pin');
|
||||||
final autoPin = ref.read(prefsChangeNotifierProvider).autoPin;
|
final autoPin = ref.read(prefsChangeNotifierProvider).autoPin;
|
||||||
|
|
||||||
if (autoPin && enteredPin == storedPin) {
|
if (enteredPin.length >= 4 && autoPin && enteredPin == storedPin) {
|
||||||
await Future<void>.delayed(
|
await Future<void>.delayed(
|
||||||
const Duration(milliseconds: 200),
|
const Duration(milliseconds: 200),
|
||||||
);
|
);
|
||||||
|
|
|
@ -86,7 +86,7 @@ class _ChangePinViewState extends ConsumerState<ChangePinView> {
|
||||||
final storedPin = await _secureStore.read(key: 'stack_pin');
|
final storedPin = await _secureStore.read(key: 'stack_pin');
|
||||||
final autoPin = ref.read(prefsChangeNotifierProvider).autoPin;
|
final autoPin = ref.read(prefsChangeNotifierProvider).autoPin;
|
||||||
|
|
||||||
if (autoPin && enteredPin == storedPin) {
|
if (enteredPin.length >= 4 && autoPin && enteredPin == storedPin) {
|
||||||
await _pageController.nextPage(
|
await _pageController.nextPage(
|
||||||
duration: const Duration(milliseconds: 300),
|
duration: const Duration(milliseconds: 300),
|
||||||
curve: Curves.linear,
|
curve: Curves.linear,
|
||||||
|
|
Loading…
Reference in a new issue