Skip to content

Commit

Permalink
Fix recovery passphrase flow
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFeickert committed Oct 26, 2023
1 parent 4947df5 commit 9555364
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions applications/minotari_console_wallet/src/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,13 +757,19 @@ pub(crate) fn boot_with_password(
}

let password = match boot_mode {
// A new wallet requires entering and confirming a passphrase
WalletBoot::New => {
// Get a new passphrase
debug!(target: LOG_TARGET, "Prompting for passphrase.");
debug!(target: LOG_TARGET, "Prompting for passphrase for new wallet.");
get_new_passphrase("Create wallet passphrase: ", "Confirm wallet passphrase: ")?
},
WalletBoot::Existing | WalletBoot::Recovery => {
debug!(target: LOG_TARGET, "Prompting for passphrase.");
// Recovery from a seed requires entering and confirming a passphrase
WalletBoot::Recovery => {
debug!(target: LOG_TARGET, "Prompting for passphrase for wallet recovery.");
get_new_passphrase("Create wallet passphrase: ", "Confirm wallet passphrase: ")?
},
// Opening an existing wallet only requires entering a passphrase
WalletBoot::Existing => {
debug!(target: LOG_TARGET, "Prompting for passphrase for existing wallet.");
prompt_password("Enter wallet passphrase: ")?
},
};
Expand Down

0 comments on commit 9555364

Please sign in to comment.