From 1877fd4ee9b5208ad20f65dbb3f6487a5e08a9b5 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 25 Sep 2019 17:35:14 +0000 Subject: [PATCH] core: handle removal of non-existing PIN in require_confirm_change_pin (cherry picked from commit 40c66e6d856c69696b711932d3e6f8ec494f9a32) --- core/src/apps/management/change_pin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/apps/management/change_pin.py b/core/src/apps/management/change_pin.py index a5947b6cb0..6f482342b5 100644 --- a/core/src/apps/management/change_pin.py +++ b/core/src/apps/management/change_pin.py @@ -58,3 +58,6 @@ def require_confirm_change_pin(ctx: wire.Context, msg: ChangePin) -> None: text.normal("Do you really want to") text.bold("enable PIN protection?") return require_confirm(ctx, text) + + # removing non-existing PIN + raise wire.ProcessError("PIN protection already disabled")