fix auction view exception
This commit is contained in:
parent
c226677fc6
commit
9d8ba6d236
|
@ -512,15 +512,23 @@ export const AuctionCard = ({
|
|||
bids.length === 0 &&
|
||||
auctionView.auctionDataExtended?.info.instantSalePrice
|
||||
) {
|
||||
const bid = await sendPlaceBid(
|
||||
connection,
|
||||
wallet,
|
||||
myPayingAccount.pubkey,
|
||||
auctionView,
|
||||
accountByMint,
|
||||
auctionView.auctionDataExtended?.info.instantSalePrice,
|
||||
);
|
||||
setLastBid(bid);
|
||||
try {
|
||||
const bid = await sendPlaceBid(
|
||||
connection,
|
||||
wallet,
|
||||
myPayingAccount.pubkey,
|
||||
auctionView,
|
||||
accountByMint,
|
||||
auctionView.auctionDataExtended?.info.instantSalePrice,
|
||||
);
|
||||
setLastBid(bid);
|
||||
} catch (e) {
|
||||
console.error('sendPlaceBid', e)
|
||||
setShowBidModal(false);
|
||||
setLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
await update();
|
||||
|
|
|
@ -24,7 +24,7 @@ export interface AuctionCard extends CardProps {
|
|||
}
|
||||
|
||||
export const AuctionRenderCard = (props: AuctionCard) => {
|
||||
let { auctionView } = props;
|
||||
const { auctionView } = props;
|
||||
const id = auctionView.thumbnail.metadata.pubkey;
|
||||
const art = useArt(id);
|
||||
const name = art?.title || ' ';
|
||||
|
@ -42,7 +42,7 @@ export const AuctionRenderCard = (props: AuctionCard) => {
|
|||
const isUpcoming = auctionView.state === AuctionViewState.Upcoming;
|
||||
|
||||
const winningBid = useHighestBidForAuction(auctionView.auction.pubkey);
|
||||
const ended =
|
||||
const ended = !auctionView.isInstantSale &&
|
||||
state?.hours === 0 && state?.minutes === 0 && state?.seconds === 0;
|
||||
|
||||
let currentBid: number | string = 0;
|
||||
|
|
Loading…
Reference in New Issue