1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-02 02:41:28 +00:00

fsm: add for button before Recovery device

This commit is contained in:
Pavol Rusnak 2018-03-20 15:41:16 +01:00
parent 5ae04c17c5
commit 559a700fb0
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -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,