Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cosmos sdk decimal under typingsFormat.customTypes.useCosmosSDKDec flag #332

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

Zetazzz
Copy link
Collaborator

@Zetazzz Zetazzz commented Mar 29, 2023

handled all fields with (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" when encoding and decoding.
added a flag in option: "typingsFormat.customTypes.useCosmosSDKDec"
regenerated output-v4

Now all decimal fields are handled like these:
encode: writer.uint32(10).string(Decimal.fromUserInput(message.rate, 18).atomics);
decode: message.rate = Decimal.fromAtomics(reader.string(), 18).toString();

@Zetazzz Zetazzz marked this pull request as ready for review March 29, 2023 07:22
@pyramation pyramation changed the title handled cosmos sdk decimal under a flag cosmos sdk decimal under typingsFormat.customTypes.useCosmosSDKDec flag Mar 29, 2023
@pyramation pyramation merged commit cc1684d into cosmology-tech:main Mar 29, 2023
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.

None yet

2 participants