Skip to content

Commit

Permalink
chore(tezos): fix fetching metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
D4mph1r committed Aug 27, 2024
1 parent f4b467a commit 9ef3fa9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions src/contractsTypes/tezos/NFT.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ export type Storage = {
},
Array<nat>
>;
token_metadata: BigMap<
nat,
{
token_id: nat;
token_info: MMap<string, bytes>;
}
>;
tokens: {
token_metadata: BigMap<
nat,
{
token_id: nat;
token_info: MMap<string, bytes>;
}
>
};
metadata: BigMap<string, bytes>;
admin: address;
};
Expand Down
2 changes: 1 addition & 1 deletion src/handler/tezos/utils/nftData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default async function nftData(

const tokenMetaData = await (
await nftContract.storage()
).token_metadata.get(tas.nat(tokenId.toString()));
).tokens.token_metadata.get(tas.nat(tokenId.toString()));
const metaDataInHex = tokenMetaData.token_info.get("");
return bytesToString(metaDataInHex);
};
Expand Down

0 comments on commit 9ef3fa9

Please sign in to comment.