diff --git a/js/packages/web/src/actions/closeVault.ts b/js/packages/web/src/actions/closeVault.ts
index dcc6b31..bdcaf86 100644
--- a/js/packages/web/src/actions/closeVault.ts
+++ b/js/packages/web/src/actions/closeVault.ts
@@ -4,13 +4,11 @@ import {
PublicKey,
TransactionInstruction,
} from '@solana/web3.js';
-import { utils, actions, models, findProgramAddress } from '@oyster/common';
+import { actions, models } from '@oyster/common';
import { AccountLayout } from '@solana/spl-token';
import BN from 'bn.js';
-import { METAPLEX_PREFIX } from '../models/metaplex';
-const { createTokenAccount, activateVault, combineVault, AUCTION_PREFIX } =
- actions;
+const { createTokenAccount, activateVault, combineVault } = actions;
const { approve } = models;
// This command "closes" the vault, by activating & combining it in one go, handing it over to the auction manager
@@ -28,25 +26,12 @@ export async function closeVault(
instructions: TransactionInstruction[];
signers: Keypair[];
}> {
- const PROGRAM_IDS = utils.programIds();
-
const accountRentExempt = await connection.getMinimumBalanceForRentExemption(
AccountLayout.span,
);
let signers: Keypair[] = [];
let instructions: TransactionInstruction[] = [];
- const auctionKey: PublicKey = (
- await findProgramAddress(
- [
- Buffer.from(AUCTION_PREFIX),
- PROGRAM_IDS.auction.toBuffer(),
- vault.toBuffer(),
- ],
- PROGRAM_IDS.auction,
- )
- )[0];
-
await activateVault(
new BN(0),
vault,
diff --git a/js/packages/web/src/actions/makeAuction.ts b/js/packages/web/src/actions/makeAuction.ts
index 556dcd0..ac58b52 100644
--- a/js/packages/web/src/actions/makeAuction.ts
+++ b/js/packages/web/src/actions/makeAuction.ts
@@ -7,7 +7,6 @@ import {
CreateAuctionArgs,
} from '@oyster/common';
-import { METAPLEX_PREFIX } from '../models/metaplex';
const { AUCTION_PREFIX, createAuction } = actions;
// This command makes an auction
diff --git a/js/packages/web/src/actions/nft.tsx b/js/packages/web/src/actions/nft.tsx
index 6796ea2..406d059 100644
--- a/js/packages/web/src/actions/nft.tsx
+++ b/js/packages/web/src/actions/nft.tsx
@@ -11,7 +11,6 @@ import {
Data,
Creator,
findProgramAddress,
- MetadataCategory,
} from '@oyster/common';
import React from 'react';
import { MintLayout, Token } from '@solana/spl-token';
@@ -337,7 +336,7 @@ export const mintNFT = async (
notify({
message: 'Art created on Solana',
description: (
-
+
Arweave Link
),
diff --git a/js/packages/web/src/actions/sendRedeemBid.ts b/js/packages/web/src/actions/sendRedeemBid.ts
index e6caf46..ab8b92a 100644
--- a/js/packages/web/src/actions/sendRedeemBid.ts
+++ b/js/packages/web/src/actions/sendRedeemBid.ts
@@ -214,7 +214,7 @@ export async function sendRedeemBid(
}
if (
- wallet.publicKey.toBase58() ==
+ wallet.publicKey.toBase58() ===
auctionView.auctionManager.info.authority.toBase58()
) {
await claimUnusedPrizes(
diff --git a/js/packages/web/src/components/ArtContent/index.tsx b/js/packages/web/src/components/ArtContent/index.tsx
index c3ff69c..73ccf56 100644
--- a/js/packages/web/src/components/ArtContent/index.tsx
+++ b/js/packages/web/src/components/ArtContent/index.tsx
@@ -1,4 +1,4 @@
-import React, { Ref, useCallback, useEffect, useRef, useState } from 'react';
+import React, { Ref, useCallback, useEffect, useState } from 'react';
import { Image } from 'antd';
import { MetadataCategory, MetadataFile } from '@oyster/common';
import { MeshViewer } from '../MeshViewer';
@@ -47,7 +47,7 @@ const CachedImageContent = ({
style?: React.CSSProperties;
}) => {
const [loaded, setLoaded] = useState(false);
- const { cachedBlob, isLoading } = useCachedImage(uri || '');
+ const { cachedBlob } = useCachedImage(uri || '');
return toLamportVal;
- } else if (expected == toLamportVal) {
+ } else if (expected === toLamportVal) {
// If gap tick is set, no way you can bid in this case - you must bid higher.
return true;
}
diff --git a/js/packages/web/src/components/ViewOn/index.tsx b/js/packages/web/src/components/ViewOn/index.tsx
index 8d4b918..fe06623 100644
--- a/js/packages/web/src/components/ViewOn/index.tsx
+++ b/js/packages/web/src/components/ViewOn/index.tsx
@@ -1,19 +1,15 @@
import React from 'react';
-import { useParams } from 'react-router-dom';
-import { Row, Col, Button } from 'antd';
+import { Col, Button } from 'antd';
import {
useArt,
- useAuction,
} from '../../hooks';
import {
useConnectionConfig,
} from '@oyster/common';
-export const ViewOn = () => {
- const { id } = useParams<{ id: string }>();
+export const ViewOn = ({ id }: { id: string }) => {
const { env } = useConnectionConfig();
- const auction = useAuction(id);
- const art = useArt(auction?.thumbnail.metadata.pubkey);
+ const art = useArt(id);
return (
<>
diff --git a/js/packages/web/src/contexts/meta.tsx b/js/packages/web/src/contexts/meta.tsx
index ac9260f..24ae13f 100644
--- a/js/packages/web/src/contexts/meta.tsx
+++ b/js/packages/web/src/contexts/meta.tsx
@@ -33,7 +33,6 @@ import {
} from '@oyster/common';
import { MintInfo } from '@solana/spl-token';
import { Connection, PublicKey, PublicKeyAndAccount } from '@solana/web3.js';
-import BN from 'bn.js';
import React, {
useCallback,
useContext,
@@ -43,7 +42,6 @@ import React, {
} from 'react';
import {
AuctionManager,
- AuctionManagerStatus,
BidRedemptionTicket,
decodeAuctionManager,
decodeBidRedemptionTicket,
diff --git a/js/packages/web/src/models/metaplex/index.ts b/js/packages/web/src/models/metaplex/index.ts
index 0ac065f..580d3a2 100644
--- a/js/packages/web/src/models/metaplex/index.ts
+++ b/js/packages/web/src/models/metaplex/index.ts
@@ -342,6 +342,14 @@ export class Store {
}
}
+export enum AuctionManagerStatus {
+ Initialized,
+ Validated,
+ Running,
+ Disbursing,
+ Finished,
+}
+
export class AuctionManagerState {
status: AuctionManagerStatus = AuctionManagerStatus.Initialized;
winningConfigItemsValidated: number = 0;
@@ -355,14 +363,6 @@ export class AuctionManagerState {
}
}
-export enum AuctionManagerStatus {
- Initialized,
- Validated,
- Running,
- Disbursing,
- Finished,
-}
-
export class BidRedemptionTicket {
key: MetaplexKey = MetaplexKey.BidRedemptionTicketV1;
participationRedeemed: boolean = false;
diff --git a/js/packages/web/src/types/index.ts b/js/packages/web/src/types/index.ts
index 930faf4..60099a7 100644
--- a/js/packages/web/src/types/index.ts
+++ b/js/packages/web/src/types/index.ts
@@ -1,5 +1,3 @@
-import { Creator, MetadataCategory } from '@oyster/common';
-
export interface Auction {
name: string;
auctionerName: string;
diff --git a/js/packages/web/src/views/art/index.tsx b/js/packages/web/src/views/art/index.tsx
index 8fda3f4..03211cd 100644
--- a/js/packages/web/src/views/art/index.tsx
+++ b/js/packages/web/src/views/art/index.tsx
@@ -5,7 +5,7 @@ import { useArt, useExtendedArt } from './../../hooks';
import './index.less';
import { ArtContent } from '../../components/ArtContent';
-import { shortenAddress, TokenAccount, useConnection, useUserAccounts, useWallet } from '@oyster/common';
+import { shortenAddress, useConnection, useWallet } from '@oyster/common';
import { MetaAvatar } from '../../components/MetaAvatar';
import { sendSignMetadata } from '../../actions/sendSignMetadata';
import { PublicKey } from '@solana/web3.js';
@@ -84,7 +84,7 @@ export const ArtView = () => {
-
+