Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
use 1st, 2nd, 3rd, etc. for recovery (not 1., 2., 3., etc).
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Jun 6, 2014
1 parent 465ec21 commit 8c4540e
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions firmware/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,23 @@ void next_word(void) {
layoutDialogSwipe(DIALOG_ICON_INFO, NULL, NULL, NULL, "Please enter the word", NULL, fake_word, NULL, "on your computer", NULL);
} else {
fake_word[0] = 0;
char descbuf[] = "__. word";
char *desc = descbuf;
char desc[] = "##th word";
if (word_pos < 10) {
desc++;
desc[0] = ' ';
} else {
descbuf[0] = '0' + word_pos / 10;
desc[0] = '0' + word_pos / 10;
}
descbuf[1] = '0' + word_pos % 10;
layoutDialogSwipe(DIALOG_ICON_INFO, NULL, NULL, NULL, "Please enter the", NULL, desc, NULL, "of your mnemonic", NULL);
desc[1] = '0' + word_pos % 10;
if (word_pos == 1 || word_pos == 21) {
desc[2] = 's'; desc[3] = 't';
} else
if (word_pos == 2 || word_pos == 22) {
desc[2] = 'n'; desc[3] = 'd';
} else
if (word_pos == 3 || word_pos == 23) {
desc[2] = 'r'; desc[3] = 'd';
}
layoutDialogSwipe(DIALOG_ICON_INFO, NULL, NULL, NULL, "Please enter the", NULL, (word_pos < 10 ? desc + 1 : desc), NULL, "of your mnemonic", NULL);
}
WordRequest resp;
memset(&resp, 0, sizeof(WordRequest));
Expand Down

0 comments on commit 8c4540e

Please sign in to comment.