Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hyperliquid/utils/signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def address_to_bytes(address):


def action_hash(action, vault_address, nonce, expires_after):
data = msgpack.packb(action)
data = msgpack.packb(action,use_bin_type=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In earlier versions, this flag defaults to False. Python’s dependency management can be chaotic for those are not familier with Python. When they using the wrong msgpack version would quickly becomes a nightmare. I ran into this exact issue and ended up spending a whole night tracking down .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pyproject.toml specifies that the minimum required version of msgpack is 1.0.5 so that shouldn't be possible. I don't think it's worth programming this defensively

data += nonce.to_bytes(8, "big")
if vault_address is None:
data += b"\x00"
Expand Down
Loading