Skip to content

Commit

Permalink
Some Cli polish (solana-labs#8966)
Browse files Browse the repository at this point in the history
automerge
  • Loading branch information
CriesofCarrots authored Mar 19, 2020
1 parent b84468e commit 6b9a093
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 0 additions & 8 deletions cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
7 changes: 6 additions & 1 deletion remote-wallet/src/ledger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;
Expand All @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions remote-wallet/src/remote_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6b9a093

Please sign in to comment.