Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanjay176 committed Jul 9, 2024
1 parent 5ae7ef4 commit c5176ef
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions account_manager/src/validator/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,18 +339,3 @@ fn check_password_on_keystore(
Err(e) => Err(format!("Error whilst decrypting keypair: {:?}", e)),
}
}

/// Prompts the user for a password and returns the user input.
/// Returns `None` if the user returns an empty password.
fn get_password(stdin_inputs: bool) -> Option<ZeroizeString> {
eprintln!();
eprintln!("{}", PASSWORD_PROMPT);

let password_from_user = read_password_from_user(stdin_inputs).ok()?;
if password_from_user.as_ref().is_empty() {
eprintln!("Continuing without password.");
sleep(Duration::from_secs(1)); // Provides nicer UX.
return None;
}
Some(password_from_user)
}

0 comments on commit c5176ef

Please sign in to comment.