Skip to content

Commit

Permalink
Add missing TransactionsProvider to address/tokens page (#276)
Browse files Browse the repository at this point in the history
This is required for the TokenHistoryCard

Fixes #274
  • Loading branch information
mcintyre94 authored Jul 18, 2023
1 parent 75e5f03 commit 7e0e619
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 4 additions & 2 deletions app/address/[address]/tokens/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { TokenHistoryCard } from '@components/account/TokenHistoryCard';
import getReadableTitleFromAddress, { AddressPageMetadataProps } from '@utils/get-readable-title-from-address';
import { Metadata } from 'next/types';

import { TransactionsProvider } from '@/app/providers/transactions';

type Props = Readonly<{
params: {
address: string;
Expand All @@ -18,9 +20,9 @@ export async function generateMetadata(props: AddressPageMetadataProps): Promise

export default function OwnedTokensPage({ params: { address } }: Props) {
return (
<>
<TransactionsProvider>
<OwnedTokensCard address={address} />
<TokenHistoryCard address={address} />
</>
</TransactionsProvider>
);
}
8 changes: 0 additions & 8 deletions app/providers/transactions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,6 @@ export async function fetchTransactionStatus(
});
}

export function useTransactions() {
const context = React.useContext(StateContext);
if (!context) {
throw new Error(`useTransactions must be used within a TransactionsProvider`);
}
return context;
}

export function useTransactionStatus(
signature: TransactionSignature | undefined
): Cache.CacheEntry<TransactionStatus> | undefined {
Expand Down

1 comment on commit 7e0e619

@vercel
Copy link

@vercel vercel bot commented on 7e0e619 Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

explorer – ./

explorer-git-master-solana-labs.vercel.app
explorer-solana-labs.vercel.app
explorer.solana.com

Please sign in to comment.