diff --git a/lib/providers/my_wallets.dart b/lib/providers/my_wallets.dart index 169dfb6..c058ec4 100644 --- a/lib/providers/my_wallets.dart +++ b/lib/providers/my_wallets.dart @@ -149,11 +149,14 @@ class MyWalletsProvider with ChangeNotifier { notifyListeners(); } + int lockPin = 0; Future resetPinCode([int minutes = 15]) async { + lockPin++; + final actualLock = lockPin; await Future.delayed( Duration(seconds: configBox.get('isCacheChecked') ? minutes * 60 : 1)); - log.i('reset pin code ...'); - pinCode = ''; + log.i('reset pin code, lock $actualLock ...'); + if (actualLock == lockPin) pinCode = ''; } void rebuildWidget() { diff --git a/pubspec.lock b/pubspec.lock index 588d418..374a0c2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -253,13 +253,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" - cron: - dependency: "direct main" - description: - name: cron - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" cross_file: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c9130f5..eaa3fdc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -81,7 +81,6 @@ dependencies: ref: fixAndroidActivityVersion dots_indicator: ^2.1.0 web_socket_channel: ^2.2.0 - cron: ^0.5.0 dev_dependencies: # flutter_launcher_icons: ^0.9.2