diff --git a/crates/engine/src/ext.rs b/crates/engine/src/ext.rs index dce7aa21fe7..24087c33a0a 100644 --- a/crates/engine/src/ext.rs +++ b/crates/engine/src/ext.rs @@ -92,7 +92,7 @@ define_error_codes! { /// recording was disabled. LoggingDisabled = 9, /// ECDSA pubkey recovery failed. Most probably wrong recovery id or signature. - EcdsaRecoverFailed = 11, + EcdsaRecoveryFailed = 11, } /// The raw return code returned by the host side. @@ -423,7 +423,7 @@ impl Engine { *output = pub_key.serialize(); Ok(()) } - Err(_) => Err(Error::EcdsaRecoverFailed), + Err(_) => Err(Error::EcdsaRecoveryFailed), } } } diff --git a/crates/env/src/engine/experimental_off_chain/impls.rs b/crates/env/src/engine/experimental_off_chain/impls.rs index 74d255f5780..1df3ffefbff 100644 --- a/crates/env/src/engine/experimental_off_chain/impls.rs +++ b/crates/env/src/engine/experimental_off_chain/impls.rs @@ -111,7 +111,7 @@ impl From for crate::Error { ext::Error::CodeNotFound => Self::CodeNotFound, ext::Error::NotCallable => Self::NotCallable, ext::Error::LoggingDisabled => Self::LoggingDisabled, - ext::Error::EcdsaRecoverFailed => Self::EcdsaRecoverFailed, + ext::Error::EcdsaRecoveryFailed => Self::EcdsaRecoveryFailed, } } } @@ -285,7 +285,7 @@ impl EnvBackend for EnvInstance { *output = pub_key.serialize(); Ok(()) } - Err(_) => Err(Error::EcdsaRecoverFailed), + Err(_) => Err(Error::EcdsaRecoveryFailed), } } diff --git a/crates/env/src/engine/off_chain/impls.rs b/crates/env/src/engine/off_chain/impls.rs index 1ef53f1c046..aea95eeb947 100644 --- a/crates/env/src/engine/off_chain/impls.rs +++ b/crates/env/src/engine/off_chain/impls.rs @@ -231,7 +231,7 @@ impl EnvBackend for EnvInstance { *output = pub_key.serialize(); Ok(()) } - Err(_) => Err(Error::EcdsaRecoverFailed), + Err(_) => Err(Error::EcdsaRecoveryFailed), } } diff --git a/crates/env/src/engine/on_chain/ext.rs b/crates/env/src/engine/on_chain/ext.rs index 66bee33b4c3..75826728b9f 100644 --- a/crates/env/src/engine/on_chain/ext.rs +++ b/crates/env/src/engine/on_chain/ext.rs @@ -79,7 +79,7 @@ define_error_codes! { /// recording was disabled. LoggingDisabled = 9, /// ECDSA pubkey recovery failed. Most probably wrong recovery id or signature. - EcdsaRecoverFailed = 11, + EcdsaRecoveryFailed = 11, } /// Thin-wrapper around a `u32` representing a pointer for Wasm32. diff --git a/crates/env/src/engine/on_chain/impls.rs b/crates/env/src/engine/on_chain/impls.rs index 2be6718333f..df70641fd92 100644 --- a/crates/env/src/engine/on_chain/impls.rs +++ b/crates/env/src/engine/on_chain/impls.rs @@ -108,7 +108,7 @@ impl From for Error { ext::Error::CodeNotFound => Self::CodeNotFound, ext::Error::NotCallable => Self::NotCallable, ext::Error::LoggingDisabled => Self::LoggingDisabled, - ext::Error::EcdsaRecoverFailed => Self::EcdsaRecoverFailed, + ext::Error::EcdsaRecoveryFailed => Self::EcdsaRecoveryFailed, } } } diff --git a/crates/env/src/error.rs b/crates/env/src/error.rs index f66079f2d23..5fdfb3141b2 100644 --- a/crates/env/src/error.rs +++ b/crates/env/src/error.rs @@ -50,7 +50,7 @@ pub enum Error { /// recording was disabled. LoggingDisabled, /// ECDSA pubkey recovery failed. Most probably wrong recovery id or signature. - EcdsaRecoverFailed, + EcdsaRecoveryFailed, } /// A result of environmental operations. diff --git a/crates/lang/src/env_access.rs b/crates/lang/src/env_access.rs index 1fdc6af27b6..f581dce85e9 100644 --- a/crates/lang/src/env_access.rs +++ b/crates/lang/src/env_access.rs @@ -821,7 +821,7 @@ where /// let failed_result = self.env().ecdsa_recover(&signature, &[0; 32]); /// assert!(failed_result.is_err()); /// if let Err(e) = failed_result { - /// assert_eq!(e, ink_env::Error::EcdsaRecoverFailed); + /// assert_eq!(e, ink_env::Error::EcdsaRecoveryFailed); /// } /// } /// # @@ -836,6 +836,6 @@ where let mut output = [0; 33]; ink_env::ecdsa_recover(signature, message_hash, &mut output) .map(|_| output.into()) - .map_err(|_| Error::EcdsaRecoverFailed) + .map_err(|_| Error::EcdsaRecoveryFailed) } }