remove unused code from web/src/hooks

This commit is contained in:
John Rees 2021-06-05 13:35:41 +01:00
parent e35e8eab89
commit 199c40a905
No known key found for this signature in database
GPG Key ID: 4124863B5E4EE329
7 changed files with 5 additions and 27 deletions

View File

@ -28,20 +28,11 @@ import {
setProgramIds,
useConnectionConfig,
} from '@oyster/common';
import { MintInfo, Token, TOKEN_PROGRAM_ID } from '@solana/spl-token';
import {
NAME_PROGRAM_ID,
VERIFICATION_AUTHORITY_OFFSET,
TWITTER_VERIFICATION_AUTHORITY,
TWITTER_ACCOUNT_LENGTH,
NameRegistryState,
} from '@solana/spl-name-service';
import { MintInfo } from '@solana/spl-token';
import {
Connection,
PublicKey,
PublicKeyAndAccount,
Transaction,
TransactionInstruction,
PublicKeyAndAccount
} from '@solana/web3.js';
import BN from 'bn.js';
import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';

View File

@ -3,7 +3,6 @@ import { PublicKey } from '@solana/web3.js';
import { useMeta } from '../contexts';
import { Art, Artist, ArtType } from '../types';
import {
Creator,
Edition,
MasterEdition,
Metadata,

View File

@ -1,9 +1,4 @@
import {
TokenAccount,
useConnection,
useUserAccounts,
useWallet,
} from '@oyster/common';
import { useWallet } from '@oyster/common';
import { PublicKey } from '@solana/web3.js';
import { useEffect, useState } from 'react';
import {

View File

@ -10,7 +10,6 @@ import {
MasterEdition,
useWallet,
} from '@oyster/common';
import { WalletAdapter } from '@solana/wallet-base';
import { PublicKey } from '@solana/web3.js';
import BN from 'bn.js';
import { useEffect, useState } from 'react';

View File

@ -1,13 +1,11 @@
import React, { useMemo } from 'react';
import { PublicKey } from '@solana/web3.js';
import {
AuctionData,
BidderMetadata,
BidderMetadataParser,
cache,
ParsedAccount,
} from '@oyster/common';
import { useAuction } from './useAuction';
export const useHighestBidForAuction = (auctionPubkey: PublicKey | string) => {
const bids = useBidsForAuction(auctionPubkey);

View File

@ -1,5 +1,3 @@
import { TokenAccount, useUserAccounts, useWallet } from '@oyster/common';
import { SafetyDepositDraft } from '../actions/createAuctionManager';
import { useMeta } from '../contexts';
import { PublicKey } from '@solana/web3.js';

View File

@ -1,12 +1,10 @@
import { TokenAccount, useUserAccounts, useWallet } from '@oyster/common';
import { TokenAccount, useUserAccounts } from '@oyster/common';
import { SafetyDepositDraft } from '../actions/createAuctionManager';
import { useMeta } from './../contexts';
export const useUserArts = (): SafetyDepositDraft[] => {
const { metadata, masterEditions, editions, whitelistedCreatorsByCreator } =
useMeta();
const { metadata, masterEditions, editions } = useMeta();
const { userAccounts } = useUserAccounts();
const { wallet } = useWallet();
const accountByMint = userAccounts.reduce((prev, acc) => {
prev.set(acc.info.mint.toBase58(), acc);