Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Switches the handling of wallet recovery passphrase entry to require confirmation and provide complexity analysis.
Closes #5859.
Motivation and Context
When recovering a wallet from a seed, the user is prompted to enter a passphrase without confirming it, and the passphrase complexity is not checked. That is, the flow is the same for wallet recovery as for opening an existing wallet, which is incorrect.
This PR switches the flow to that of a new wallet. When the user enters a passphrase, they must confirm it, and its complexity is analyzed to ensure the user is informed of the safety of their chosen passphrase.
Note that each case (new wallet, wallet recovery, existing wallet) is now handled separately. This is mildly redundant, but allows for better logging and makes the intent more clear.
How Has This Been Tested?
Tested manually.
What process can a PR reviewer use to test or verify this change?
Assert that the passphrase handling logic is now correct. Manually test empty, weak, and strong passphrases in the interface, including the case where the user has a weak or empty passphrase and confirms this is their intent.