Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New wallet exists on password mismatch #5391

Closed
SWvheerden opened this issue May 18, 2023 · 1 comment · Fixed by #5396
Closed

New wallet exists on password mismatch #5391

SWvheerden opened this issue May 18, 2023 · 1 comment · Fixed by #5396
Labels
A-wallet Area - related to the wallet C-bug Category - fixes a bug, typically associated with an issue. E-good_first_issue Experience Level - Good for newcomers

Comments

@SWvheerden
Copy link
Collaborator

When creating a new wallet, and the passwords mismatch the wallet currently auto exits.
This should not be and it should only loop till correct.

@SWvheerden SWvheerden added C-bug Category - fixes a bug, typically associated with an issue. E-good_first_issue Experience Level - Good for newcomers A-wallet Area - related to the wallet labels May 18, 2023
@AaronFeickert
Copy link
Collaborator

s/exists/exits

SWvheerden pushed a commit that referenced this issue May 19, 2023
Description
---
If the user enters a new or changed passphrase and fails to confirm it,
an exit error is immediately returned. This PR updates to prompt the
user to try again, up to a sanity limit.

Closes [issue 5391](#5391).

Motivation and Context
---
The user is prompted to enter and confirm a new passphrase in two cases:
when creating a new wallet, and when changing the passphrase of an
existing wallet. In both cases, failure to confirm the new passphrase
correctly returns an exit error.

This PR prompts the user again if the new passphrase and its
confirmation do not match.

We probably don't want the user to get stuck in an infinite loop and go
insane, so there is a sanity limit of three tries. If the user fails
this many times, we return the exit error.

How Has This Been Tested?
---
Tested manually.

What process can a PR reviewer use to test or verify this change?
---
Test the following scenarios manually:
- Create a new wallet. Fail to confirm a new passphrase three times.
Confirm that the process exits.
- Create a new wallet. Confirm a new passphrase within three tries.
Confirm that the process succeeds.
- Change an existing wallet's passphrase. Fail to confirm a new
passphrase three times. Confirm that the process exits.
- Change an existing wallet's passphrase. Confirm a new passphrase
within three tries. Confirm that the process succeeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-wallet Area - related to the wallet C-bug Category - fixes a bug, typically associated with an issue. E-good_first_issue Experience Level - Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants