Support (u)int64 in javascript perfectly
Closed this issue · 4 comments
https://github.com/tendermint/go-amino/blob/v0.14.1/json-encode.go#L99
When json encdoing, go-amino encodes (u)int64 by string, because some languages like JS can't handle (u)int64 perfectly.
So, It seemed that it is necessary to decode (u)int64 to library like bignumber.js?
Hi, I'm also encoding u(int64) with string. Not test with decoded yet. But you can try ?
I have successfully used this library to send transactions to Cosmos hub in my experimental project. So I think there are no big problems for encoding in general use. But I can not be sure that there is not a problem because decoding has never been used.
Until now, I wrote some testing example with decoding and it worked. Still, I will add more unit test. We will start Js-Cosmos soon and we will have more case for testing.
Work under cosmos-js started here https://github.com/cybercongress/js-cosmos