Skip to content

Commit 1586b0f

Browse files
committed
fix(eip712-message): canonicalize to low-S before returning bytes
Signed-off-by: Joseph Livesey <[email protected]>
1 parent b21bc70 commit 1586b0f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tap_eip712_message/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ pub trait SignatureBytesExt {
6262

6363
impl SignatureBytesExt for Signature {
6464
fn get_signature_bytes(&self) -> SignatureBytes {
65-
SignatureBytes(self.as_bytes())
65+
// Canonicalize to low-S form before returning bytes
66+
let canonical = self.normalized_s();
67+
SignatureBytes(canonical.as_bytes())
6668
}
6769
}
6870

tap_receipt/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ where
6868
type Output = SignatureBytes;
6969

7070
fn unique_id(&self) -> Self::Output {
71-
self.signature.normalized_s().get_signature_bytes()
71+
self.signature.get_signature_bytes()
7272
}
7373
}

0 commit comments

Comments
 (0)