Skip to content

Commit

Permalink
fix: to_eip2098 r, s asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
avsetsin committed Nov 25, 2024
1 parent b352448 commit 15b24a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/dsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def to_eip2098(signedMessage: SignedMessage) -> Dict[str, Any]:
s = signedMessage.s
v = signedMessage.v

assert (r.bit_length() + 7) // 8 == 32
assert (s.bit_length() + 7) // 8 == 32
assert r.bit_length() // 8 <= 32
assert s.bit_length() // 8 <= 32

if v not in (27, 28):
raise ValueError("Invalid v value. Must be 27 or 28.")
Expand Down

0 comments on commit 15b24a6

Please sign in to comment.