diff --git a/toolkit/primitives/domain/src/lib.rs b/toolkit/primitives/domain/src/lib.rs index 9833c30c2..2b5c7a197 100644 --- a/toolkit/primitives/domain/src/lib.rs +++ b/toolkit/primitives/domain/src/lib.rs @@ -220,14 +220,14 @@ impl MainchainPrivateKey { #[cfg(feature = "std")] pub fn to_pub_key_hash(&self) -> MainchainAddressHash { cardano_serialization_lib::PrivateKey::from_normal_bytes(&self.0) - .expect("impossible") + .expect("Conversion cannot fail on valid MainchainPrivateKey values") .to_public() .hash() .to_bytes() .as_slice() .try_into() .map(MainchainAddressHash) - .expect("impossible") + .expect("Conversion cannot fail as representation is the same") } }