From dae6d7bab03507b72ceacb442e5666c167cb03a7 Mon Sep 17 00:00:00 2001 From: Linus Kendall Date: Wed, 31 May 2023 02:57:45 +0530 Subject: [PATCH] Fix edition nonce (#78) --- digital_asset_types/src/dapi/common/asset.rs | 4 ++-- digital_asset_types/src/rpc/asset.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/digital_asset_types/src/dapi/common/asset.rs b/digital_asset_types/src/dapi/common/asset.rs index d454e34af..b36b14036 100644 --- a/digital_asset_types/src/dapi/common/asset.rs +++ b/digital_asset_types/src/dapi/common/asset.rs @@ -267,8 +267,8 @@ pub fn asset_to_rpc(asset: FullAsset) -> Result { .and_then(|v| v.as_bool()) .unwrap_or(false); let edition_nonce = safe_select(chain_data_selector, "$.edition_nonce") - .and_then(|v| v.as_u64()) - .unwrap_or(0); + .and_then(|v| v.as_u64()); + Ok(RpcAsset { interface: interface.clone(), id: bs58::encode(asset.id).into_string(), diff --git a/digital_asset_types/src/rpc/asset.rs b/digital_asset_types/src/rpc/asset.rs index 8d9984a55..9357ed493 100644 --- a/digital_asset_types/src/rpc/asset.rs +++ b/digital_asset_types/src/rpc/asset.rs @@ -331,7 +331,7 @@ pub struct Uses { pub struct Supply { pub print_max_supply: u64, pub print_current_supply: u64, - pub edition_nonce: u64, + pub edition_nonce: Option, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]