diff --git a/crates/signer-local/src/lib.rs b/crates/signer-local/src/lib.rs index f6d171f2b6b..bf17204d0c4 100644 --- a/crates/signer-local/src/lib.rs +++ b/crates/signer-local/src/lib.rs @@ -289,4 +289,15 @@ mod test { let expected_error = alloy_signer::Error::TransactionChainIdMismatch { signer: 1, tx: 2 }; assert_eq!(error.to_string(), expected_error.to_string()); } + + // + #[test] + fn test_parity() { + let signer = PrivateKeySigner::random(); + let message = b"hello"; + let signature = signer.sign_message_sync(message).unwrap(); + let value = signature.as_bytes().to_vec(); + let recovered_signature: Signature = value.as_slice().try_into().unwrap(); + assert_eq!(signature, recovered_signature); + } }