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

Fix omit empty for amino #569

Merged
merged 29 commits into from
Mar 18, 2024
Merged

Fix omit empty for amino #569

merged 29 commits into from
Mar 18, 2024

Conversation

Zetazzz
Copy link
Collaborator

@Zetazzz Zetazzz commented Jan 16, 2024

No description provided.

@Zetazzz Zetazzz mentioned this pull request Jan 16, 2024
@Zetazzz
Copy link
Collaborator Author

Zetazzz commented Jan 21, 2024

Also need to consider how to generate default amino string field:

  string memo = 8;

should be generated to:

memo = memo;

or

memo = memo === "" ? undefined : memo

@rasoulMrz
Copy link
Collaborator

Also need to consider how to generate default amino string field:

  string memo = 8;

should be generated to:

memo = memo;

or

memo = memo === "" ? undefined : memo

Always need to omit empty fields, unless we have the annotation stating otherwise. So the second one is the right one for toAmino.

@Zetazzz Zetazzz marked this pull request as ready for review March 18, 2024 14:57
@Zetazzz Zetazzz merged commit 24dfd67 into main Mar 18, 2024
2 checks passed
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.

2 participants