diff --git a/explorer/src/components/instruction/token/TokenDetailsCard.tsx b/explorer/src/components/instruction/token/TokenDetailsCard.tsx index 4677a445e8..487f95d16c 100644 --- a/explorer/src/components/instruction/token/TokenDetailsCard.tsx +++ b/explorer/src/components/instruction/token/TokenDetailsCard.tsx @@ -19,6 +19,8 @@ import { } from "providers/accounts"; import { normalizeTokenAmount } from "utils"; import { reportError } from "utils/sentry"; +import { useCluster } from "providers/cluster"; +import { TokenRegistry } from "tokenRegistry"; type DetailsProps = { tx: ParsedTransaction; @@ -81,6 +83,7 @@ function TokenInstruction(props: InfoProps) { const tokenInfo = useTokenAccountInfo(tokenAddress); const mintAddress = infoMintAddress || tokenInfo?.mint.toBase58(); const mintInfo = useMintAccountInfo(mintAddress); + const { cluster } = useCluster(); const fetchAccountInfo = useFetchAccountInfo(); React.useEffect(() => { @@ -97,6 +100,26 @@ function TokenInstruction(props: InfoProps) { const decimals = mintInfo?.decimals; const attributes = []; + + let tokenSymbol = ""; + + if (mintAddress) { + const tokenDetails = TokenRegistry.get(mintAddress, cluster); + + if (tokenDetails && "symbol" in tokenDetails) { + tokenSymbol = tokenDetails.symbol; + } + + attributes.push( +