Skip to content

Commit

Permalink
add as_module_binding code
Browse files Browse the repository at this point in the history
  • Loading branch information
baichuan3 committed Sep 7, 2023
1 parent 467707e commit 370bb0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/rooch-types/src/framework/coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl AnnotatedCoinStore {
Ok(annotated_coin_store)
}

pub fn get_coin_type__(&self) -> StructTag {
pub fn get_coin_type_(&self) -> StructTag {
self.value.coin.type_.clone()
}

Expand Down
4 changes: 2 additions & 2 deletions crates/rooch/src/commands/account/commands/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ impl CommandAction<()> for BalanceCommand {
.expect("Expected Option<ObjectID>");
result.into()
})?;
// let coin_module = client.as_module_binding::<CoinModule>();
// let coin_store_handle_opt = coin_module.coin_store_handle(addr)?;
let coin_store_handle = coin_store_handle_opt
// .expect(format!("Failed to get coin store handle via {}", addr).as_str());
.unwrap_or_else(|| panic!("Failed to get coin store handle via {}", addr));

let mut result = AccountInfoView::new(0u64, vec![]);
Expand All @@ -82,7 +83,6 @@ impl CommandAction<()> for BalanceCommand {
coin_type_opt.0.to_canonical_string()
);
let key = resource_tag_to_key(&StructTag::from_str(coin_store_type.as_str())?);
// let key = resource_tag_to_key(&coin_type_opt.0);
let _hex_key = hex::encode(key.clone());
let keys = vec![key];
let mut states = client
Expand Down

0 comments on commit 370bb0e

Please sign in to comment.