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

Omit Payload from json if empty #519

Merged
merged 3 commits into from
Feb 16, 2024
Merged

Omit Payload from json if empty #519

merged 3 commits into from
Feb 16, 2024

Conversation

chipshort
Copy link
Collaborator

@chipshort chipshort commented Feb 15, 2024

The Rust side expects either a valid Binary (i.e. some valid string) or no field at all, but the current version would produce a null value, which fails when deserializing in Rust.
See also CosmWasm/cosmwasm#2027 for the corresponding fix in the go generator.

Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, nice catch. Seems like a new situation that we did not have before because we now use #[serde(default)] here instead of an Option.

@chipshort chipshort merged commit ad6f170 into main Feb 16, 2024
13 checks passed
@chipshort chipshort deleted the fix-payload-json branch February 16, 2024 11:06
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