diff --git a/explorer/src/components/account/TokenLargestAccountsCard.tsx b/explorer/src/components/account/TokenLargestAccountsCard.tsx index 52f2dda68ac439..a403a1d8e311a4 100644 --- a/explorer/src/components/account/TokenLargestAccountsCard.tsx +++ b/explorer/src/components/account/TokenLargestAccountsCard.tsx @@ -1,11 +1,12 @@ import React from "react"; -import { PublicKey, TokenAccountBalancePair } from "@solana/web3.js"; +import { PublicKey } from "@solana/web3.js"; import { LoadingCard } from "components/common/LoadingCard"; import { ErrorCard } from "components/common/ErrorCard"; import { Address } from "components/common/Address"; import { useTokenLargestTokens, useFetchTokenLargestAccounts, + TokenAccountBalancePairWithOwner, } from "providers/mints/largest"; import { FetchStatus } from "providers/cache"; import { TokenRegistry } from "tokenRegistry"; @@ -64,11 +65,12 @@ export function TokenLargestAccountsCard({ pubkey }: { pubkey: PublicKey }) {
Rank | Address | +Owner | Balance {unitLabel} | % of Total Supply | {index + 1} | ++ + | - + {account.owner && ( + + )} | {account.uiAmount} | {percent} | diff --git a/explorer/src/providers/accounts/index.tsx b/explorer/src/providers/accounts/index.tsx index 3bdd225d182c1a..78b4c92f72feb9 100644 --- a/explorer/src/providers/accounts/index.tsx +++ b/explorer/src/providers/accounts/index.tsx @@ -127,6 +127,7 @@ async function fetchAccountInfo( try { const info = coerce(result.data.parsed, ParsedInfo); const parsed = coerce(info, TokenAccount); + data = { program: "spl-token", parsed, diff --git a/explorer/src/providers/mints/largest.tsx b/explorer/src/providers/mints/largest.tsx index 17780b9eddb7f1..00cae426925af0 100644 --- a/explorer/src/providers/mints/largest.tsx +++ b/explorer/src/providers/mints/largest.tsx @@ -7,10 +7,14 @@ import { PublicKey, Connection, TokenAccountBalancePair, + ParsedAccountData, } from "@solana/web3.js"; +import { TokenAccountInfo, TokenAccount } from "validators/accounts/token"; +import { ParsedInfo } from "validators"; +import { coerce } from "superstruct"; type LargestAccounts = { - largest: TokenAccountBalancePair[]; + largest: TokenAccountBalancePairWithOwner[]; }; type State = Cache.State
---|