From 559a700fb04092bf6bc3410fd30ea463c19ef6c6 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 20 Mar 2018 15:41:16 +0100 Subject: [PATCH] fsm: add for button before Recovery device --- firmware/fsm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firmware/fsm.c b/firmware/fsm.c index 1a508c637a..d6bcfc0ee0 100644 --- a/firmware/fsm.c +++ b/firmware/fsm.c @@ -1212,6 +1212,13 @@ void fsm_msgRecoveryDevice(RecoveryDevice *msg) CHECK_PARAM(!msg->has_word_count || msg->word_count == 12 || msg->word_count == 18 || msg->word_count == 24, _("Invalid word count")); + layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Confirm"), NULL, _("Do you really want to"), _("recover the device?"), NULL, NULL, NULL, NULL); + if (!protectButton(ButtonRequestType_ButtonRequest_ProtectCall, false)) { + fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL); + layoutHome(); + return; + } + recovery_init( msg->has_word_count ? msg->word_count : 12, msg->has_passphrase_protection && msg->passphrase_protection,