Skip to content

Commit

Permalink
[asset-mapping] rename struct_tag_for_token to struct_tag_for_resource
Browse files Browse the repository at this point in the history
  • Loading branch information
welbon committed Jan 21, 2025
1 parent 47fff61 commit c78807a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vm/types/src/account_config/resources/fungible_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl FungibleStoreResource {
}

// TODO/XXX: remove this once the MoveResource trait allows type arguments to `struct_tag`.
pub fn struct_tag_for_token() -> StructTag {
pub fn struct_tag_for_resource() -> StructTag {
StructTag {
address: CORE_CODE_ADDRESS,
name: Self::struct_identifier(),
Expand Down
6 changes: 3 additions & 3 deletions vm/types/src/state_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ pub trait StateReaderExt: StateView {

let primary_store_address = fungible_store::primary_store(&address, &type_tag.address);
// Get from coin store
let fungible_store_state_key = StateKey::resource(
let fungible_store_state_key = StateKey::resource_group(
&primary_store_address,
&FungibleStoreResource::struct_tag_for_token(),
)?;
&FungibleStoreResource::struct_tag_for_resource(),
);

let fungible_balance = match self.get_state_value_bytes(&fungible_store_state_key)? {
Some(bytes) => {
Expand Down

0 comments on commit c78807a

Please sign in to comment.