Skip to content

Commit

Permalink
fix: force sig to include 0x prepended
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanAmenechi committed Jul 29, 2024
1 parent 113e913 commit 0db4618
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py_order_utils/builders/order_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ def build_order_signature(self, _order: Order) -> str:
"""
Signs the order
"""
return "0x" + self.sign(self._create_struct_hash(_order))
sig = self.sign(self._create_struct_hash(_order))
if len(sig) > 2 and sig[:2] != "0x":
sig = f"0x{sig}"
return sig

def build_signed_order(self, data: OrderData) -> SignedOrder:
"""
Expand Down

0 comments on commit 0db4618

Please sign in to comment.