Skip to content

Commit

Permalink
[bugfix][wallet] - trim [yn] user input (MystenLabs#1734)
Browse files Browse the repository at this point in the history
* trim yn input in wallet

* address PR comment
  • Loading branch information
patrickkuo authored May 4, 2022
1 parent 32fbb45 commit ff45071
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sui/src/bin/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ async fn try_main() -> Result<(), anyhow::Error> {
// Prompt user for connect to gateway if config not exists.
if !wallet_conf_path.exists() {
print!(
"Config file [{:?}] doesn't exist, do you want to connect to a Sui Gateway [yn]?",
"Config file [{:?}] doesn't exist, do you want to connect to a Sui Gateway [yN]?",
wallet_conf_path
);
if matches!(read_line(), Ok(line) if line.to_lowercase() == "y") {
if matches!(read_line(), Ok(line) if line.trim().to_lowercase() == "y") {
print!("Sui Gateway Url (Default to Sui DevNet if not specified) : ");
let url = read_line()?;
let url = if url.trim().is_empty() {
Expand Down

0 comments on commit ff45071

Please sign in to comment.