diff --git a/CHANGELOG.md b/CHANGELOG.md index ca49e58437..d6932d44fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ The minor version will be incremented upon a breaking change and the patch versi ## [Unreleased] +### Fixes + +* lang: Fix `returns` being serialized as `null` instead of `undefined` in IDL ([#1782](https://github.com/project-serum/anchor/pull/1782)). + ## [0.24.1] - 2022-04-12 ### Fixes diff --git a/lang/syn/src/idl/mod.rs b/lang/syn/src/idl/mod.rs index a92d9baa1b..50bafb8953 100644 --- a/lang/syn/src/idl/mod.rs +++ b/lang/syn/src/idl/mod.rs @@ -45,6 +45,7 @@ pub struct IdlInstruction { pub name: String, pub accounts: Vec, pub args: Vec, + #[serde(skip_serializing_if = "Option::is_none")] pub returns: Option, }