From c69f683867b89bd41dfa3007829b4a157d09bc2a Mon Sep 17 00:00:00 2001 From: goldnite Date: Thu, 14 Dec 2023 17:12:25 -0500 Subject: [PATCH] add auction winner check in collectAuctionTokens --- .../marketplace/english-auctions/EnglishAuctionsLogic.sol | 2 +- contracts/prebuilts/marketplace/marketplace-v3.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/prebuilts/marketplace/english-auctions/EnglishAuctionsLogic.sol b/contracts/prebuilts/marketplace/english-auctions/EnglishAuctionsLogic.sol index 66574a050..62b50bb87 100644 --- a/contracts/prebuilts/marketplace/english-auctions/EnglishAuctionsLogic.sol +++ b/contracts/prebuilts/marketplace/english-auctions/EnglishAuctionsLogic.sol @@ -156,7 +156,7 @@ contract EnglishAuctionsLogic is IEnglishAuctions, ReentrancyGuard, ERC2771Conte require(_targetAuction.status != IEnglishAuctions.Status.CANCELLED, "Marketplace: invalid auction."); require(_targetAuction.endTimestamp <= block.timestamp, "Marketplace: auction still active."); - require(_winningBid.bidder != address(0), "Marketplace: no bids were made."); + require(_winningBid.bidder == _msgSender(), "Marketplace: not auction winner."); _closeAuctionForAuctionCreator(_targetAuction, _winningBid); diff --git a/contracts/prebuilts/marketplace/marketplace-v3.md b/contracts/prebuilts/marketplace/marketplace-v3.md index d224b95fe..a88f69e1b 100644 --- a/contracts/prebuilts/marketplace/marketplace-v3.md +++ b/contracts/prebuilts/marketplace/marketplace-v3.md @@ -487,7 +487,7 @@ The `EnglishAuctions` extension smart contract lets you sell NFTs (ERC-721 or ER | auctionId | The unique ID of the auction to collect the payout for. | - Criteria that must be satisfied - The auction must be expired. - - The caller must be the winning bidder. + - The caller must be the auction winner. ### `bidInAuction`