diff --git a/client/src/app/components/stardust/address/section/native-tokens/AssetsTable.tsx b/client/src/app/components/stardust/address/section/native-tokens/AssetsTable.tsx index ad6f4b299..ebfe3abbc 100644 --- a/client/src/app/components/stardust/address/section/native-tokens/AssetsTable.tsx +++ b/client/src/app/components/stardust/address/section/native-tokens/AssetsTable.tsx @@ -35,10 +35,12 @@ const AssetsTable: React.FC = ({ networkId, outputs, setTokenC ) { for (const token of (output as CommonOutput).nativeTokens ?? []) { const existingToken = theTokens.find((t) => t.id === token.id); + // Convert to BigInt again in case the amount is hex + const amount = BigInt(token.amount); if (existingToken) { - existingToken.amount += token.amount; + existingToken.amount += amount; } else { - theTokens.push({ id: token.id, amount: token.amount }); + theTokens.push({ id: token.id, amount }); } } } diff --git a/client/src/app/components/stardust/foundry/TokenInfoSection.tsx b/client/src/app/components/stardust/foundry/TokenInfoSection.tsx index e0d189268..629f0974b 100644 --- a/client/src/app/components/stardust/foundry/TokenInfoSection.tsx +++ b/client/src/app/components/stardust/foundry/TokenInfoSection.tsx @@ -29,9 +29,9 @@ const TokenInfoSection: React.FC = ({ tokenId, tokenSchem const simpleTokenScheme = tokenScheme as SimpleTokenScheme; - const maximumSupply = formatNumberWithCommas(simpleTokenScheme.maximumSupply); - const mintedTokens = formatNumberWithCommas(simpleTokenScheme.mintedTokens); - const meltedTokens = formatNumberWithCommas(simpleTokenScheme.meltedTokens); + const maximumSupply = formatNumberWithCommas(BigInt(simpleTokenScheme.maximumSupply)); + const mintedTokens = formatNumberWithCommas(BigInt(simpleTokenScheme.mintedTokens)); + const meltedTokens = formatNumberWithCommas(BigInt(simpleTokenScheme.meltedTokens)); return (