1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

recovery: don't reset storage on typos during dry-run recovery

This commit is contained in:
Pavol Rusnak 2017-07-31 20:49:34 +02:00
parent a9a414df08
commit ace1d84265
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -450,7 +450,9 @@ static void recovery_scrambledword(const char *word)
{
if (word_pos == 0) { // fake word
if (strcmp(word, fake_word) != 0) {
storage_reset();
if (!dry_run) {
storage_reset();
}
fsm_sendFailure(FailureType_Failure_ProcessError, _("Wrong word retyped"));
layoutHome();
return;
@ -467,7 +469,9 @@ static void recovery_scrambledword(const char *word)
wl++;
}
if (!found) {
storage_reset();
if (!dry_run) {
storage_reset();
}
fsm_sendFailure(FailureType_Failure_DataError, _("Word not found in a wordlist"));
layoutHome();
return;