mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-23 07:58:09 +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,12 +359,14 @@ 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"));
|
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);
|
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)) {
|
if (!protectButton(ButtonRequestType_ButtonRequest_ProtectCall, false)) {
|
||||||
fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL);
|
fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL);
|
||||||
layoutHome();
|
layoutHome();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
recovery_init(
|
recovery_init(
|
||||||
msg->has_word_count ? msg->word_count : 12,
|
msg->has_word_count ? msg->word_count : 12,
|
||||||
|
Loading…
Reference in New Issue
Block a user