diff --git a/app/address/[address]/entries/page-client.tsx b/app/address/[address]/entries/page-client.tsx
index 34dde053..a7688f68 100644
--- a/app/address/[address]/entries/page-client.tsx
+++ b/app/address/[address]/entries/page-client.tsx
@@ -4,6 +4,7 @@ import { LookupTableEntriesCard } from '@components/account/address-lookup-table
import { isAddressLookupTableAccount } from '@components/account/address-lookup-table/types';
import { ParsedAccountRenderer } from '@components/account/ParsedAccountRenderer';
import React from 'react';
+import { Base58EncodedAddress } from 'web3js-experimental';
type Props = Readonly<{
params: {
@@ -19,7 +20,7 @@ function AddressLookupTableEntriesRenderer({
const rawData = account?.data.raw;
if (parsedData && parsedData.program === 'address-lookup-table' && parsedData.parsed.type === 'lookupTable') {
return ;
- } else if (rawData && isAddressLookupTableAccount(account.owner, rawData)) {
+ } else if (rawData && isAddressLookupTableAccount(account.owner.toBase58() as Base58EncodedAddress, rawData)) {
return ;
} else {
return onNotFound();
diff --git a/app/address/[address]/layout.tsx b/app/address/[address]/layout.tsx
index 8d8814fe..41ef791e 100644
--- a/app/address/[address]/layout.tsx
+++ b/app/address/[address]/layout.tsx
@@ -41,6 +41,7 @@ import Link from 'next/link';
import { redirect, useSelectedLayoutSegment } from 'next/navigation';
import React, { PropsWithChildren } from 'react';
import useSWRImmutable from 'swr/immutable';
+import { Base58EncodedAddress } from 'web3js-experimental';
import { FullTokenInfo, getFullTokenInfo } from '@/app/utils/token-info';
@@ -361,7 +362,7 @@ function InfoSection({ account, tokenInfo }: { account: Account, tokenInfo?: Ful
parsedData.parsed.type === 'lookupTable'
) {
return ;
- } else if (rawData && isAddressLookupTableAccount(account.owner, rawData)) {
+ } else if (rawData && isAddressLookupTableAccount(account.owner.toBase58() as Base58EncodedAddress, rawData)) {
return ;
} else if (account.owner.toBase58() === FEATURE_PROGRAM_ID) {
return ;
@@ -441,7 +442,7 @@ function getTabs(pubkey: PublicKey, account: Account): TabComponent[] {
}
// Add the key for address lookup tables
- if (account.data.raw && isAddressLookupTableAccount(account.owner, account.data.raw)) {
+ if (account.data.raw && isAddressLookupTableAccount(account.owner.toBase58() as Base58EncodedAddress, account.data.raw)) {
tabs.push(...TABS_LOOKUP['address-lookup-table']);
}
diff --git a/app/components/account/address-lookup-table/types.ts b/app/components/account/address-lookup-table/types.ts
index ad2686ed..739d7035 100644
--- a/app/components/account/address-lookup-table/types.ts
+++ b/app/components/account/address-lookup-table/types.ts
@@ -1,10 +1,11 @@
-import { PublicKey } from '@solana/web3.js';
+import { Base58EncodedAddress } from 'web3js-experimental';
-const PROGRAM_ID = 'AddressLookupTab1e1111111111111111111111111';
+const LOOKUP_TABLE_ACCOUNT_TYPE = 1;
+const PROGRAM_ID =
+ 'AddressLookupTab1e1111111111111111111111111' as Base58EncodedAddress<'AddressLookupTab1e1111111111111111111111111'>;
-export function isAddressLookupTableAccount(accountOwner: PublicKey, accountData: Uint8Array): boolean {
- if (accountOwner.toBase58() !== PROGRAM_ID) return false;
+export function isAddressLookupTableAccount(accountOwner: Base58EncodedAddress, accountData: Uint8Array): boolean {
+ if (accountOwner !== PROGRAM_ID) return false;
if (!accountData || accountData.length === 0) return false;
- const LOOKUP_TABLE_ACCOUNT_TYPE = 1;
return accountData[0] === LOOKUP_TABLE_ACCOUNT_TYPE;
}