From a4f47ddd2100c211a37a1362cd7cf4e15a40e846 Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 21 May 2020 12:53:11 +0200 Subject: [PATCH] core/lockscreen: ignore exception when user taps "unlock" and then cancels --- core/src/apps/homescreen/lockscreen.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/apps/homescreen/lockscreen.py b/core/src/apps/homescreen/lockscreen.py index 68ecd2cc19..94197eb1be 100644 --- a/core/src/apps/homescreen/lockscreen.py +++ b/core/src/apps/homescreen/lockscreen.py @@ -1,4 +1,4 @@ -from trezor import loop, res, ui +from trezor import loop, res, ui, wire from . import HomescreenBase @@ -10,7 +10,10 @@ async def lockscreen() -> None: if can_lock_device(): await Lockscreen() - await unlock_device() + try: + await unlock_device() + except wire.PinCancelled: + pass class Lockscreen(HomescreenBase):