Skip to content
This repository has been archived by the owner on Dec 22, 2019. It is now read-only.

Need to provide unit test #3

Closed
TanNgocDo opened this issue Aug 20, 2018 · 2 comments
Closed

Need to provide unit test #3

TanNgocDo opened this issue Aug 20, 2018 · 2 comments

Comments

@TanNgocDo
Copy link
Contributor

No description provided.

@ethanfrey
Copy link

Hi, thank you for starting work on this. I was happy to hear it existed and would be glad to use it.

The first two things I noticed were the lack of some unit tests, and lack of types (I am biased to Typescript, but that is not essential at all).

If you want, I could make a PR with a lot of test cases generated from golang, with hex-encoded binary format and unmarshalled structure. Let me know if that would be useful, and I will make a pr. I don't have much time to work on this, but would love to support somehow.

@TanNgocDo
Copy link
Contributor Author

TanNgocDo commented Sep 6, 2018

Hi Ethan, I'm very happy if you can provide some test-cases.
Typescript will be supported soon(I hope).
Due to the "dynamic typing" of JS, Js-Amino provided an "intermediate" "AminoType" that contained declared types(Int8, Int64, String, Interface.....) before actually encode/decode.
Currently, I created 2 branches: master and "compatibility" .

  • "Master" keeps updated with the lasted version of Go-Amino(from v.0.10.1 of Go-Amino). I tested with some simple encode and decode, but not have implemented decode/encode with Interface from/to Go Interface. It will be added soon.

  • Branch "compatibility"(https://github.com/TanNgocDo/Js-Amino/tree/feature/compatibility) works with Go-Amino(v.0.9.9) . It has not had decoding feature yet(but works well with encoding ). I'm using this branch for encoding on my JS-client to encode Transaction and send to Cosmos to decode it. It's ok right now :)
    I will take one or two days to provide the documentation and refactor the code, I guest two branches will be developed independently.

Please feel free to add PR, I'm glad to have comment and contribution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants