Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions explorer/src/components/account/OwnedTokensCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ function HoldingsDetailTable({ tokens }: { tokens: TokenInfoWithPubkey[] }) {
const detailsList: React.ReactNode[] = [];
const { cluster } = useCluster();
const showLogos = tokens.some(
(t) => TokenRegistry.get(t.info.mint.toBase58(), cluster) !== undefined
(t) =>
TokenRegistry.get(t.info.mint.toBase58(), cluster)?.icon !== undefined
);
tokens.forEach((tokenAccount) => {
const address = tokenAccount.pubkey.toBase58();
Expand All @@ -102,7 +103,7 @@ function HoldingsDetailTable({ tokens }: { tokens: TokenInfoWithPubkey[] }) {
<tr key={address}>
{showLogos && (
<td className="w-1 p-0 text-center">
{tokenDetails && (
{tokenDetails?.icon && (
<img
src={tokenDetails.icon}
alt="token icon"
Expand Down Expand Up @@ -160,16 +161,17 @@ function HoldingsSummaryTable({ tokens }: { tokens: TokenInfoWithPubkey[] }) {
}

const detailsList: React.ReactNode[] = [];
const showLogos = tokens.some((t) =>
TokenRegistry.get(t.info.mint.toBase58(), cluster)
const showLogos = tokens.some(
(t) =>
TokenRegistry.get(t.info.mint.toBase58(), cluster)?.icon !== undefined
);
mappedTokens.forEach((totalByMint, mintAddress) => {
const tokenDetails = TokenRegistry.get(mintAddress, cluster);
detailsList.push(
<tr key={mintAddress}>
{showLogos && (
<td className="w-1 p-0 text-center">
{tokenDetails && (
{tokenDetails?.icon && (
<img
src={tokenDetails.icon}
alt="token icon"
Expand Down