From 6b9a0935c139121ab55816562d131fa5ded5e158 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Thu, 19 Mar 2020 13:03:36 -0600 Subject: [PATCH] Some Cli polish (#8966) automerge --- cli/src/cli.rs | 8 -------- remote-wallet/src/ledger.rs | 7 ++++++- remote-wallet/src/remote_wallet.rs | 4 ++++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cli/src/cli.rs b/cli/src/cli.rs index de34206741..86ad212e67 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -2191,17 +2191,9 @@ where )) = err.kind() { if let Some(specific_error) = E::decode_custom_error_to_enum(*code) { - error!("{}::{:?}", E::type_of(), specific_error); - eprintln!( - "Program Error ({}::{:?}): {}", - E::type_of(), - specific_error, - specific_error - ); return Err(specific_error.into()); } } - error!("{:?}", err); Err(err.into()) } Ok(sig) => Ok(sig), diff --git a/remote-wallet/src/ledger.rs b/remote-wallet/src/ledger.rs index 1d6e4552c5..b4464ee192 100644 --- a/remote-wallet/src/ledger.rs +++ b/remote-wallet/src/ledger.rs @@ -236,7 +236,8 @@ impl LedgerWallet { self.write(command, p1, p2, data)?; if p1 == P1_CONFIRM && is_last_part(p2) { println!( - "Waiting for approval from remote wallet {}", + "Waiting for your approval on {} {}", + self.name(), self.pretty_path ); let result = self.read()?; @@ -261,6 +262,10 @@ impl LedgerWallet { } impl RemoteWallet for LedgerWallet { + fn name(&self) -> &str { + "Ledger hardware wallet" + } + fn read_device( &self, dev_info: &hidapi::DeviceInfo, diff --git a/remote-wallet/src/remote_wallet.rs b/remote-wallet/src/remote_wallet.rs index 89dfe44e43..496e7f78e4 100644 --- a/remote-wallet/src/remote_wallet.rs +++ b/remote-wallet/src/remote_wallet.rs @@ -173,6 +173,10 @@ impl RemoteWalletManager { /// `RemoteWallet` trait pub trait RemoteWallet { + fn name(&self) -> &str { + "remote wallet" + } + /// Parse device info and get device base pubkey fn read_device( &self,