Skip to content

Commit

Permalink
Fix edition nonce (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
linuskendall authored May 30, 2023
1 parent beaf042 commit dae6d7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions digital_asset_types/src/dapi/common/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ pub fn asset_to_rpc(asset: FullAsset) -> Result<RpcAsset, DbErr> {
.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(),
Expand Down
2 changes: 1 addition & 1 deletion digital_asset_types/src/rpc/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u64>,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
Expand Down

0 comments on commit dae6d7b

Please sign in to comment.