From 97fc5b649b298fb7786862816d6b3b04022c6406 Mon Sep 17 00:00:00 2001 From: Eksandral <159817688+eksandral@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:46:08 +0200 Subject: [PATCH] Fix asset deserialization of metadata_hash field when it is missed --- algonaut_algod/src/models/asset_params.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/algonaut_algod/src/models/asset_params.rs b/algonaut_algod/src/models/asset_params.rs index ec56532..ff2b4a0 100644 --- a/algonaut_algod/src/models/asset_params.rs +++ b/algonaut_algod/src/models/asset_params.rs @@ -37,7 +37,8 @@ pub struct AssetParams { #[serde( rename = "metadata-hash", skip_serializing_if = "Option::is_none", - deserialize_with = "deserialize_opt_hash" + deserialize_with = "deserialize_opt_hash", + default )] pub metadata_hash: Option, /// \\[an\\] Name of this asset, as supplied by the creator. Included only when the asset name is composed of printable utf-8 characters.