diff --git a/javascript/engine-js/src/tokens/ITokenDetail.ts b/javascript/engine-js/src/tokens/ITokenDetail.ts index 12a2bebd..ec5315eb 100644 --- a/javascript/engine-js/src/tokens/ITokenDetail.ts +++ b/javascript/engine-js/src/tokens/ITokenDetail.ts @@ -13,6 +13,7 @@ export interface ITokenDetail { image?: string; attributes?: NFTAttribute[]; data?: IAttestationData | any; + balance?: string // For ERC1155 } export interface NFTAttribute { diff --git a/javascript/tokenscript-viewer/src/components/viewers/token/token-viewer.tsx b/javascript/tokenscript-viewer/src/components/viewers/token/token-viewer.tsx index 551ffcd9..50af642c 100644 --- a/javascript/tokenscript-viewer/src/components/viewers/token/token-viewer.tsx +++ b/javascript/tokenscript-viewer/src/components/viewers/token/token-viewer.tsx @@ -109,13 +109,14 @@ export class TokenViewer { contractAddress: query.get("contract"), name: tokenMeta.collectionData.title as string, description: tokenMeta.collectionData.description as string, - image: tokenMeta.collectionData.image as string + image: tokenMeta.collectionData.image as string, }, collectionId: tokenMeta.collection, description: tokenMeta.description, image: tokenMeta.image, name: tokenMeta.title, - tokenId: tokenMeta.tokenId + tokenId: tokenMeta.tokenId, + balance: tokenMeta.balance } this.app.hideTsLoader(); @@ -211,7 +212,13 @@ export class TokenViewer {