manuelmauro / algonaut

A rusty sdk for Algorand.
MIT License
64 stars 38 forks source link

Fix asset deserialization of metadata_hash field when it is missed #237

Closed eksandral closed 5 months ago

eksandral commented 5 months ago

When it deserializes models::Asset from an API call like let asset = client.asset(1903271236).await?; and when metadata_hash is missed there is an error of Error: Msg: Serde(Error("missing fieldmetadata-hash", line: 1, column: 312))

the little fix of adding #[serde(default)] to the field attribute fixes this issue

manuelmauro commented 5 months ago

Thank you!