diff --git a/firmware/fsm_msg_common.h b/firmware/fsm_msg_common.h index badd39d29..218102f7b 100644 --- a/firmware/fsm_msg_common.h +++ b/firmware/fsm_msg_common.h @@ -213,13 +213,6 @@ void fsm_msgResetDevice(const ResetDevice *msg) CHECK_PARAM(!msg->has_strength || msg->strength == 128 || msg->strength == 192 || msg->strength == 256, _("Invalid seed strength")); - layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Confirm"), NULL, _("Do you really want to"), _("create a new wallet?"), NULL, NULL, NULL, NULL); - if (!protectButton(ButtonRequestType_ButtonRequest_ProtectCall, false)) { - fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL); - layoutHome(); - return; - } - reset_init( msg->has_display_random && msg->display_random, msg->has_strength ? msg->strength : 128, @@ -357,15 +350,6 @@ void fsm_msgRecoveryDevice(const RecoveryDevice *msg) CHECK_PARAM(!msg->has_word_count || msg->word_count == 12 || msg->word_count == 18 || msg->word_count == 24, _("Invalid word count")); - if (!dry_run) { - 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, diff --git a/firmware/recovery.c b/firmware/recovery.c index 703fb0718..b0d8c27c9 100644 --- a/firmware/recovery.c +++ b/firmware/recovery.c @@ -456,6 +456,15 @@ void recovery_init(uint32_t _word_count, bool passphrase_protection, bool pin_pr enforce_wordlist = _enforce_wordlist; dry_run = _dry_run; + if (!dry_run) { + 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; + } + } + if (!dry_run) { if (pin_protection && !protectChangePin()) { fsm_sendFailure(FailureType_Failure_PinMismatch, NULL); diff --git a/firmware/reset.c b/firmware/reset.c index 95323060b..2840bfd85 100644 --- a/firmware/reset.c +++ b/firmware/reset.c @@ -50,6 +50,13 @@ void reset_init(bool display_random, uint32_t _strength, bool passphrase_protect return; } + layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Confirm"), NULL, _("Do you really want to"), _("create a new wallet?"), NULL, NULL, NULL, NULL); + if (!protectButton(ButtonRequestType_ButtonRequest_ProtectCall, false)) { + fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL); + layoutHome(); + return; + } + random_buffer(int_entropy, 32); char ent_str[4][17];