diff --git a/cli/src/cli.rs b/cli/src/cli.rs index 873f4e21ce..f074dd77eb 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -315,9 +315,9 @@ pub async fn mnemonic_command(output_file_name: Option, output_stdout: O pub async fn node_info_command(storage_path: &Path) -> Result { let wallet = unlock_wallet(storage_path, None, None).await?; - let node_info = wallet.client().get_info().await?; + let node_info = serde_json::to_string_pretty(&wallet.client().get_info().await?)?; - println_log_info!("Current node info: {}", serde_json::to_string_pretty(&node_info)?); + println_log_info!("Current node info: {node_info}"); Ok(wallet) } diff --git a/cli/src/wallet_cli/mod.rs b/cli/src/wallet_cli/mod.rs index ad8d0be003..dedccc8d8c 100644 --- a/cli/src/wallet_cli/mod.rs +++ b/cli/src/wallet_cli/mod.rs @@ -571,15 +571,18 @@ pub async fn faucet_command(wallet: &Wallet, address: Option, url }; let faucet_url = url.as_deref().unwrap_or("http://localhost:8088/api/enqueue"); + let response = request_funds_from_faucet(faucet_url, &address).await?; - println_log_info!("{}", request_funds_from_faucet(faucet_url, &address).await?); + println_log_info!("{response}"); Ok(()) } // `implicit-account-creation-address` command pub async fn implicit_account_creation_address_command(wallet: &Wallet) -> Result<(), Error> { - println_log_info!("{}", wallet.implicit_account_creation_address().await?); + let address = wallet.implicit_account_creation_address().await?; + + println_log_info!("{address}"); Ok(()) } @@ -689,9 +692,9 @@ pub async fn mint_nft_command( // `node-info` command pub async fn node_info_command(wallet: &Wallet) -> Result<(), Error> { - let node_info = wallet.client().get_info().await?; + let node_info = serde_json::to_string_pretty(&wallet.client().get_info().await?)?; - println_log_info!("Current node info: {}", serde_json::to_string_pretty(&node_info)?); + println_log_info!("Current node info: {node_info}"); Ok(()) }