diff --git a/explorer/src/components/account/TokenLargestAccountsCard.tsx b/explorer/src/components/account/TokenLargestAccountsCard.tsx index bfc12bcd07..3b32d7ffa9 100644 --- a/explorer/src/components/account/TokenLargestAccountsCard.tsx +++ b/explorer/src/components/account/TokenLargestAccountsCard.tsx @@ -22,7 +22,7 @@ export function TokenLargestAccountsCard({ pubkey }: { pubkey: PublicKey }) { }, [mintAddress]); // eslint-disable-line react-hooks/exhaustive-deps const supplyTotal = supply?.data?.uiAmount; - if (!supplyTotal || !largestAccounts) { + if (supplyTotal === undefined || !largestAccounts) { return null; } @@ -78,6 +78,10 @@ const renderAccountRow = ( index: number, supply: number ) => { + let percent = "-"; + if (supply > 0) { + percent = `${((100 * account.uiAmount) / supply).toFixed(3)}%`; + } return (