diff --git a/js/packages/web/src/components/AuctionCard/index.tsx b/js/packages/web/src/components/AuctionCard/index.tsx index 768cc60..f175c83 100644 --- a/js/packages/web/src/components/AuctionCard/index.tsx +++ b/js/packages/web/src/components/AuctionCard/index.tsx @@ -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(); diff --git a/js/packages/web/src/components/AuctionRenderCard/index.tsx b/js/packages/web/src/components/AuctionRenderCard/index.tsx index 4a0b677..2487efa 100644 --- a/js/packages/web/src/components/AuctionRenderCard/index.tsx +++ b/js/packages/web/src/components/AuctionRenderCard/index.tsx @@ -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;