Skip to content

Conversation

@OlegMakarenko
Copy link
Contributor

Problem

The message is not correctly encoded when creating a TransferTransaction with RawMessage.
The Uint8Array is encoded to a hex string during RawMessage.create().
Then in the getMessageBuffer() of TransferTransaction the hex string (considered as a plain utf-8 text string) is converted to hex string again.
Also, an extra 0xFF byte is added at the beginning of the raw message.

Solution

  • Remove double conversion of RawMessage.payload to hex in TransferTransaction.getMessageBuffer(), since the payload is already in hex.
  • Remove adding an extra byte to the beginning of the message.

@OlegMakarenko OlegMakarenko marked this pull request as ready for review March 13, 2024 23:15
Copy link

@Jaguar0625 Jaguar0625 left a comment

Choose a reason for hiding this comment

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

👍

@OlegMakarenko OlegMakarenko merged commit 897e5e7 into dev Mar 14, 2024
@OlegMakarenko OlegMakarenko deleted the fix/transfer-raw-message branch March 14, 2024 20:35
@OlegMakarenko OlegMakarenko mentioned this pull request Mar 15, 2024
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.

4 participants