diff --git a/packages/metavinci/src/components/ArtCard/index.tsx b/packages/metavinci/src/components/ArtCard/index.tsx index a7a33e8..922ef65 100644 --- a/packages/metavinci/src/components/ArtCard/index.tsx +++ b/packages/metavinci/src/components/ArtCard/index.tsx @@ -7,6 +7,7 @@ import { getCountdown } from '../../utils/utils'; import { useArt } from '../../hooks'; import { PublicKey } from '@solana/web3.js'; import { ArtType } from '../../types'; +import { EditionType } from '../../models/metaplex'; const { Meta } = Card; @@ -21,6 +22,7 @@ export interface ArtCardProps extends CardProps { preview?: boolean; small?: boolean; close?: () => void; + editionType?: EditionType; endAuctionAt?: number; } @@ -37,6 +39,7 @@ export const ArtCard = (props: ArtCardProps) => { close, pubkey, endAuctionAt, + editionType, ...rest } = props; const art = useArt(pubkey); @@ -94,10 +97,12 @@ export const ArtCard = (props: ArtCardProps) => { {art.type == ArtType.LimitedMasterEdition && ( <>
- - {(art.maxSupply || 0) - (art.supply || 0)}/ - {art.maxSupply || 0} prints remaining - + {!endAuctionAt && ( + + {(art.maxSupply || 0) - (art.supply || 0)}/ + {art.maxSupply || 0} prints remaining + + )} )} {endAuctionAt && ( @@ -136,16 +141,42 @@ export const ArtCard = (props: ArtCardProps) => { ); } else if (art.type == ArtType.LimitedMasterEdition) { return ( -
- +
+ {card}
); } else if (art.type == ArtType.OpenMasterEdition) { return ( -
- {card} +
+ + {card} +
); } else return card; diff --git a/packages/metavinci/src/hooks/useAuctions.ts b/packages/metavinci/src/hooks/useAuctions.ts index bbd9ca4..2c32534 100644 --- a/packages/metavinci/src/hooks/useAuctions.ts +++ b/packages/metavinci/src/hooks/useAuctions.ts @@ -282,7 +282,7 @@ export function processAccountsIntoAuctionView( metadataByMint[ boxes[ auctionManager.info.settings.openEditionConfig - ].info.tokenMint.toBase58() + ]?.info.tokenMint.toBase58() ], safetyDeposit: boxes[auctionManager.info.settings.openEditionConfig], @@ -291,7 +291,7 @@ export function processAccountsIntoAuctionView( metadataByMint[ boxes[ auctionManager.info.settings.openEditionConfig - ].info.tokenMint.toBase58() + ]?.info.tokenMint.toBase58() ]?.info.masterEdition?.toBase58() || '' ], } diff --git a/packages/metavinci/src/views/home/index.tsx b/packages/metavinci/src/views/home/index.tsx index 159957d..e31d52b 100644 --- a/packages/metavinci/src/views/home/index.tsx +++ b/packages/metavinci/src/views/home/index.tsx @@ -8,6 +8,7 @@ import { AuctionViewState, useArt, useAuctions } from '../../hooks'; import './index.less'; import { ArtCard } from '../../components/ArtCard'; import { Link } from 'react-router-dom'; +import { EditionType } from '../../models/metaplex'; const { TabPane } = Tabs; @@ -30,12 +31,20 @@ export const HomeView = () => { > {auctions.map(m => { const id = m.auction.pubkey.toBase58(); + const winningConfig = m.auctionManager.info.settings.winningConfigs.find( + w => w.safetyDepositBoxIndex == m.thumbnail.safetyDeposit.info.order, + ); return (