diff --git a/contracts/multisig/src/ed25519.rs b/contracts/multisig/src/ed25519.rs index 18bab00af..a4b668ce5 100644 --- a/contracts/multisig/src/ed25519.rs +++ b/contracts/multisig/src/ed25519.rs @@ -1,12 +1,11 @@ -// TODO: Logic specific to secp256k1 will most likely be handled by core in the future. use crate::ContractError; -const ECDSA_SIGNATURE_LEN: usize = 64; +const ED25519_SIGNATURE_LEN: usize = 64; pub fn ed25519_verify(msg_hash: &[u8], sig: &[u8], pub_key: &[u8]) -> Result { - cosmwasm_crypto::ed25519_verify(msg_hash, &sig[0..ECDSA_SIGNATURE_LEN], pub_key).map_err(|e| { - ContractError::SignatureVerificationFailed { + cosmwasm_crypto::ed25519_verify(msg_hash, &sig[0..ED25519_SIGNATURE_LEN], pub_key).map_err( + |e| ContractError::SignatureVerificationFailed { reason: e.to_string(), - } - }) + }, + ) }