parent
492b7d5ef9
commit
9aab0b9388
|
@ -537,7 +537,7 @@ impl CliConfig<'_> {
|
|||
if !self.signers.is_empty() {
|
||||
self.signers[0].try_pubkey()
|
||||
} else {
|
||||
Err(SignerError::CustomError(
|
||||
Err(SignerError::Custom(
|
||||
"Default keypair must be set if pubkey arg not provided".to_string(),
|
||||
))
|
||||
}
|
||||
|
|
|
@ -60,16 +60,16 @@ impl From<hidapi::HidError> for RemoteWalletError {
|
|||
impl From<RemoteWalletError> for SignerError {
|
||||
fn from(err: RemoteWalletError) -> SignerError {
|
||||
match err {
|
||||
RemoteWalletError::Hid(hid_error) => SignerError::ConnectionError(hid_error),
|
||||
RemoteWalletError::DeviceTypeMismatch => SignerError::ConnectionError(err.to_string()),
|
||||
RemoteWalletError::InvalidDevice => SignerError::ConnectionError(err.to_string()),
|
||||
RemoteWalletError::Hid(hid_error) => SignerError::Connection(hid_error),
|
||||
RemoteWalletError::DeviceTypeMismatch => SignerError::Connection(err.to_string()),
|
||||
RemoteWalletError::InvalidDevice => SignerError::Connection(err.to_string()),
|
||||
RemoteWalletError::InvalidInput(input) => SignerError::InvalidInput(input),
|
||||
RemoteWalletError::NoDeviceFound => SignerError::NoDeviceFound,
|
||||
RemoteWalletError::Protocol(e) => SignerError::Protocol(e.to_string()),
|
||||
RemoteWalletError::UserCancel => {
|
||||
SignerError::UserCancel("remote wallet operation rejected by the user".to_string())
|
||||
}
|
||||
_ => SignerError::CustomError(err.to_string()),
|
||||
_ => SignerError::Custom(err.to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ pub enum SignerError {
|
|||
TransactionError(#[from] TransactionError),
|
||||
|
||||
#[error("custom error: {0}")]
|
||||
CustomError(String),
|
||||
Custom(String),
|
||||
|
||||
// Presigner-specific Errors
|
||||
#[error("presigner error")]
|
||||
|
@ -210,7 +210,7 @@ pub enum SignerError {
|
|||
|
||||
// Remote Keypair-specific Errors
|
||||
#[error("connection error: {0}")]
|
||||
ConnectionError(String),
|
||||
Connection(String),
|
||||
|
||||
#[error("invalid input: {0}")]
|
||||
InvalidInput(String),
|
||||
|
|
Loading…
Reference in New Issue