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
When it deserializes
models::Asset
from an API call likelet asset = client.asset(1903271236).await?;
and whenmetadata_hash
is missed there is an error ofError: Msg: Serde(Error("missing field
metadata-hash", line: 1, column: 312))
the little fix of adding
#[serde(default)]
to the field attribute fixes this issue