mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
Recovery: Don't ask for confirmation on dry run. (#347)
The message is very confusing, as it is not recovering the device. Since dry-run recovery does not change anything, there is no need to ask for confirmation.
This commit is contained in:
parent
d7ccc74de4
commit
cb9eefdce6
@ -359,11 +359,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;
|
||||
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(
|
||||
@ -396,4 +398,4 @@ void fsm_msgSetU2FCounter(SetU2FCounter *msg)
|
||||
storage_update();
|
||||
fsm_sendSuccess(_("U2F counter set"));
|
||||
layoutHome();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user