From 5218c1fb6bb6731a8de3a3f783b4c6770bd4ff2d Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Sat, 11 Jan 2025 21:40:05 +0800 Subject: [PATCH] update tokens_info --- cmd/db-exporter/src/main.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/db-exporter/src/main.rs b/cmd/db-exporter/src/main.rs index 6735b3bb52..71897aadb4 100644 --- a/cmd/db-exporter/src/main.rs +++ b/cmd/db-exporter/src/main.rs @@ -2627,35 +2627,35 @@ fn tokens_info( let burn_struct_tag = parse_struct_tag(token_burn_capability.as_str())?; let info_value = statedb.get_state_value(&StateKey::AccessPath( AccessPath::resource_access_path(token_address, info_struct_tag.clone()), - ))?; + )); let mint_value = statedb.get_state_value(&StateKey::AccessPath( AccessPath::resource_access_path(token_address, mint_struct_tag.clone()), - ))?; + )); let burn_value = statedb.get_state_value(&StateKey::AccessPath( AccessPath::resource_access_path(token_address, burn_struct_tag.clone()), - ))?; + )); let decoded_info: Option = match info_value { - Some(v) => { + Ok(Some(v)) => { let annotated_struct = value_annotator.view_struct(info_struct_tag, v.as_slice())?; Some(annotated_struct.into()) } - None => None, + _ => None, }; let decoded_mint: Option = match mint_value { - Some(v) => { + Ok(Some(v)) => { let annotated_struct = value_annotator.view_struct(mint_struct_tag.clone(), v.as_slice())?; Some(annotated_struct.into()) } - None => None, + _ => None, }; let decoded_burn: Option = match burn_value { - Some(v) => { + Ok(Some(v)) => { let annotated_struct = value_annotator.view_struct(burn_struct_tag.clone(), v.as_slice())?; Some(annotated_struct.into()) } - None => None, + _ => None, }; let resource_struct_tag = parse_struct_tag(token_balance.as_str())?;