More custom error rename (#9227)

automerge
This commit is contained in:
Jack May
2020-04-01 11:13:31 -07:00
committed by GitHub
parent 492b7d5ef9
commit 9aab0b9388
3 changed files with 7 additions and 7 deletions

View File

@ -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()),
}
}
}