We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
4.3.8
Serializing and the deserializing a transaction does not quite result in the same transaction. For example, this following vitest unit test will fail:
vitest
test('StacksTransaction serialize/deserialize', async () => { const options = { /* ... */ }; const tx = await makeUnsignedSTXTokenTransfer(options); const tx_encoded = tx.serialize(); const tx_decoded = deserializeTransaction(tx_encoded); expect(tx_decoded).toEqual(tx); })
The reason it fails is that the memo.content field will have a large array of null bytes:
memo.content
content: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
When it should be an empty string:
content: ''
See example unit test above
memo.content should deserialize to en empty string, and the deserialized StacksTransaction should deep equal the initial StacksTransaction
StacksTransaction
This is using NodeJS 20.7.0
The text was updated successfully, but these errors were encountered:
janniks
Successfully merging a pull request may close this issue.
What version of Stacks.js are you using?
4.3.8
Describe the bug
Serializing and the deserializing a transaction does not quite result in the same transaction. For example, this following
vitest
unit test will fail:The reason it fails is that the
memo.content
field will have a large array of null bytes:When it should be an empty string:
How to reproduce
See example unit test above
Expected behavior
memo.content
should deserialize to en empty string, and the deserializedStacksTransaction
should deep equal the initialStacksTransaction
Additional context
This is using NodeJS 20.7.0
The text was updated successfully, but these errors were encountered: