LiskArchive / lisk-elements

⚙️ Library for sending Lisk transactions from the client or server
https://lisk.io/
GNU General Public License v3.0
250 stars 64 forks source link

getBytes function should take the first 8 bytes for recipientID if it exceeds uint8 size. #1198

Closed SargeKhan closed 5 years ago

SargeKhan commented 5 years ago

Expected behavior

If the recipientId for a transaction exceeds 8 bytes, it should slice the first 8 bytes from the buffer and create a signature based on it. This functionality is required to handle exceptions correctly because the ID of the transaction in the old implementation is calculated by only taking the first 8 bytes of recipient id.

Actual behavior

If the recipient for a transaction exceeds 8 bytes, the extra bytes are not sliced.

Steps to reproduce

Test the functionality against the testnet transaction with ID: 393955899193580559

Which version(s) does this affect? (Environment, OS, etc...)

release/2.1.0