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

Merged
merged 3 commits into from
Dec 22, 2024

Conversation

LautaroPetaccio
Copy link
Contributor

@LautaroPetaccio LautaroPetaccio commented Dec 21, 2024

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.

Depends on: decentraland/decentraland-dapps#656

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 22, 2024 0:37am

@coveralls
Copy link

coveralls commented Dec 21, 2024

Coverage Status

coverage: 66.252% (-0.01%) from 66.265%
when pulling 86d7969 on fix/correctly-set-fingerprint
into 94f3ceb on master.

@cyaiox cyaiox enabled auto-merge (squash) December 22, 2024 00:50
@cyaiox cyaiox disabled auto-merge December 22, 2024 00:50
@cyaiox cyaiox merged commit 38be515 into master Dec 22, 2024
9 checks passed
@cyaiox cyaiox deleted the fix/correctly-set-fingerprint branch December 22, 2024 00:51
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.

3 participants