Skip to content

Commit

Permalink
workflow/unlock: simpler loop
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Jul 2, 2019
1 parent f974fd5 commit 15739f8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/workflow/unlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,10 @@ static void _get_mnemonic_passphrase(char* passphrase_out)
{
char mnemonic_passphrase[SET_PASSWORD_MAX_PASSWORD_LENGTH] = {0};
char mnemonic_passphrase_repeat[SET_PASSWORD_MAX_PASSWORD_LENGTH] = {0};
bool equal = false;
while (!equal) {
while (true) {
password_enter("Enter\nmnemonic passphrase", mnemonic_passphrase);
password_enter("Confirm\nmnemonic passphrase", mnemonic_passphrase_repeat);
equal = STREQ(mnemonic_passphrase, mnemonic_passphrase_repeat);
if (equal) {
if (STREQ(mnemonic_passphrase, mnemonic_passphrase_repeat)) {
snprintf(passphrase_out, SET_PASSWORD_MAX_PASSWORD_LENGTH, "%s", mnemonic_passphrase);
break;
}
Expand Down

0 comments on commit 15739f8

Please sign in to comment.