Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Incorrectly building trade byte parameters #2343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LautaroPetaccio
Copy link
Contributor

This PR changes the way we're building the trade object to be signed to correctly set the parameters of byte values (extra and the external check values). The issue seems to have come from the usage of ethers.utils.hexlify ethers.utils.toUtf8Bytes to allow building the trade signature without failures when the byte parameters where set as empty strings, which the signature function would not recognize as empty byte arrays (the real type).
This PR replaces the usage of those functions in favor of setting the value '0x', the empty bytes value, when the bytes parameters is empty or the set value when it's set.

Copy link

vercel bot commented Dec 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marketplace ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 21, 2024 2:56am

@coveralls
Copy link

Coverage Status

coverage: 66.265%. remained the same
when pulling d77d014 on fix/correctly-set-fingerprint
into 94f3ceb on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants