Skip to content

Commit 3d45f86

Browse files
authored
fix: Updates playground to remove outdated imports (#2294)
1 parent c167559 commit 3d45f86

File tree

6 files changed

+21
-9
lines changed

6 files changed

+21
-9
lines changed

packages/playground/app/mint/hooks/useEarningsData.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { useCollection } from '@/lib/nft/useCollection';
22
import { useToken } from '@/lib/nft/useToken';
3-
import type { ContractType } from '@/onchainkit/esm/nft/types';
43
import { useMemo } from 'react';
54

5+
type ContractType = 'ERC721' | 'ERC1155';
6+
7+
// eslint-disable-next-line complexity
68
export function useEarningsData(contractAddress: string, tokenId?: string) {
79
const { data: collection } = useCollection(contractAddress);
810

packages/playground/components/demo/FundCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { FundCard } from '@coinbase/onchainkit/fund';
2-
import type { PresetAmountInputs } from '../../onchainkit/esm/fund/types';
2+
3+
type PresetAmountInputs = readonly [string, string, string];
34

45
export default function FundCardDemo() {
56
const presetAmountInputs: PresetAmountInputs = ['10', '20', '100'];

packages/playground/components/demo/Transaction.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import {
33
clickContracts,
44
heterogeneousClickCalls,
55
} from '@/lib/transactions';
6-
import type { Call } from '@/onchainkit/esm/transaction/types';
7-
import type { LifecycleStatus } from '@/onchainkit/src/transaction';
86
import { TransactionTypes } from '@/types/onchainkit';
97
import {
108
Transaction,
@@ -17,11 +15,14 @@ import {
1715
TransactionToastAction,
1816
TransactionToastIcon,
1917
TransactionToastLabel,
18+
LifecycleStatus,
2019
} from '@coinbase/onchainkit/transaction';
2120
import { useCallback, useContext, useEffect, useMemo } from 'react';
22-
import type { ContractFunctionParameters } from 'viem';
21+
import type { ContractFunctionParameters, Hex } from 'viem';
2322
import { AppContext } from '../AppProvider';
2423

24+
type Call = { to: Hex; data?: Hex; value?: bigint };
25+
2526
function TransactionDemo() {
2627
const { chainId, transactionType, isSponsored } = useContext(AppContext);
2728
const contracts = clickContracts as ContractFunctionParameters[];

packages/playground/lib/nft/buildMintTransaction.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import type { BuildMintTransactionDataProps } from '@/onchainkit/esm/nft/types';
2-
import type { Call } from '@/onchainkit/esm/transaction/types';
1+
import type { BuildMintTransaction } from '@coinbase/onchainkit/nft';
32
import type { definitions } from '@reservoir0x/reservoir-sdk';
43
import { ENVIRONMENT_VARIABLES } from '../constants';
4+
import { Hex } from 'viem';
5+
6+
type BuildMintTransactionDataProps = Parameters<BuildMintTransaction>[0];
7+
8+
type Call = { to: Hex; data?: Hex; value?: bigint };
59

610
const ERROR_MAP = {
711
'Unable to mint requested quantity (max mints per wallet possibly exceeded)':

packages/playground/lib/nft/useReservoirMintData.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import type { ContractType } from '@/onchainkit/esm/nft/types';
21
import { useMemo } from 'react';
32
import { useCollection } from './useCollection';
43
import { useOwners } from './useOwners';
54
import { useToken } from './useToken';
65

6+
type ContractType = 'ERC721' | 'ERC1155';
7+
8+
// eslint-disable-next-line complexity
79
export function useReservoirMintData(
810
contractAddress: string,
911
tokenId?: string,

packages/playground/lib/nft/useReservoirNFTData.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import type { ContractType } from '@/onchainkit/esm/nft/types';
21
import { useMemo } from 'react';
32
import { useToken } from './useToken';
43

4+
type ContractType = 'ERC721' | 'ERC1155';
5+
6+
// eslint-disable-next-line complexity
57
export function useReservoirNFTData(contractAddress: string, tokenId = '0') {
68
const { data: token } = useToken(contractAddress, tokenId);
79

0 commit comments

Comments
 (0)