CLI: Strive for at least one signer (bp #14767) (#14779)

* CLI: Strive for at least one signer

(cherry picked from commit 8f8d593457)

* CLI: Allow missing pubkey in `--verbose` config output

(cherry picked from commit 90e1778cd2)

* CLI: Don't scare the users

(cherry picked from commit e9c98f2416)

Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
mergify[bot]
2021-01-22 19:50:50 +00:00
committed by GitHub
parent c49a8cb67c
commit 952a5b11c1
2 changed files with 17 additions and 4 deletions

View File

@@ -1165,7 +1165,11 @@ pub fn process_command(config: &CliConfig) -> ProcessResult {
println_name_value("RPC URL:", &config.json_rpc_url);
println_name_value("Default Signer Path:", &config.keypair_path);
if config.keypair_path.starts_with("usb://") {
println_name_value("Pubkey:", &format!("{:?}", config.pubkey()?));
let pubkey = config
.pubkey()
.map(|pubkey| format!("{:?}", pubkey))
.unwrap_or_else(|_| "Unavailable".to_string());
println_name_value("Pubkey:", &pubkey);
}
println_name_value("Commitment:", &config.commitment.commitment.to_string());
}