LiskArchive / lisk-sdk

🔩 Lisk software development kit
https://lisk.com
Apache License 2.0
2.72k stars 454 forks source link

Stores return 9-byte token ID #8102

Closed bobanm closed 1 year ago

bobanm commented 1 year ago

Expected behavior

In the example app, stores should return 8-byte token ID: buffer 04 00 00 00 00 00 00 00

Actual behavior

There is 1 byte added in front of the token ID:

Steps to reproduce

Start the example app.

This seems to be related to the example app only, and does not affect the tests.

It also seems to be related only to how data is formatted at output, as invoking endpoint token_getBalance with correct 8-byte token ID as param 0400000000000000 gives correct response.

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

Code on current development branch.

shuse2 commented 1 year ago

I checked locally

 ❯ ./bin/run endpoint:invoke token_getTotalSupply                                                                                                                                                                                                    
{"totalSupply":[{"tokenID":"0400000000000000","totalSupply":"10300000000000000"}]}

 ❯ ./bin/run endpoint:invoke token_getBalances '{ "address": "lske5sqed53fdcs4m9et28f2k7u9fk6hno9bauday"}'                                                                                                                                            [09:50:00]
{"balances":[{"tokenID":"0400000000000000","availableBalance":"100000000000000","lockedBalances":[]}]}

Could you check how to reproduce this issue?

bobanm commented 1 year ago

Tried deleting node data again, but the issue persisted.

Then I did yarn clean:full and after that everything is back to normal 👌🏻

Case closed.