Skip to content

Commit

Permalink
fsm: add for button before Recovery device
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Mar 20, 2018
1 parent 5ae04c1 commit 559a700
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions firmware/fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 559a700

Please sign in to comment.