From 4a45becd2731ccedd1aa09d7c28e87aa93b7b311 Mon Sep 17 00:00:00 2001 From: Gauthier Leonard Date: Wed, 26 Apr 2023 17:40:28 +0200 Subject: [PATCH] fix(lib): skip serializing validators if empty --- crates/ash_sdk/src/avalanche/subnets.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ash_sdk/src/avalanche/subnets.rs b/crates/ash_sdk/src/avalanche/subnets.rs index e9e6435..898e8d3 100644 --- a/crates/ash_sdk/src/avalanche/subnets.rs +++ b/crates/ash_sdk/src/avalanche/subnets.rs @@ -22,7 +22,7 @@ pub struct AvalancheSubnet { /// List of the Subnet's blockchains pub blockchains: Vec, /// List of the Subnet's validators - #[serde(default)] + #[serde(default, skip_serializing_if = "Vec::is_empty")] pub validators: Vec, }