From d76829f8172691ec85a1fe9c8d2550b7f59d2e1e Mon Sep 17 00:00:00 2001 From: naiyoma Date: Mon, 11 Mar 2024 01:44:52 +0300 Subject: [PATCH] [no changelog] refactor(core): Use utime.ticks_diff in verify_user_pin --- core/src/apps/common/request_pin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/apps/common/request_pin.py b/core/src/apps/common/request_pin.py index 06b5498d8d..fd5ad0d0ab 100644 --- a/core/src/apps/common/request_pin.py +++ b/core/src/apps/common/request_pin.py @@ -97,7 +97,7 @@ async def verify_user_pin( if ( cache_time_ms and last_unlock - and utime.ticks_ms() - last_unlock <= cache_time_ms + and utime.ticks_diff(utime.ticks_ms(), last_unlock) <= cache_time_ms and config.is_unlocked() ): return