Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: auction payout can be locked before execute #636

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ contract EnglishAuctionsLogic is IEnglishAuctions, ReentrancyGuard, ERC2771Conte
!_englishAuctionsStorage().payoutStatus[_auctionId].paidOutBidAmount,
"Marketplace: payout already completed."
);
_englishAuctionsStorage().payoutStatus[_auctionId].paidOutBidAmount = true;

Auction memory _targetAuction = _englishAuctionsStorage().auctions[_auctionId];
Bid memory _winningBid = _englishAuctionsStorage().winningBid[_auctionId];
Expand All @@ -158,6 +157,8 @@ contract EnglishAuctionsLogic is IEnglishAuctions, ReentrancyGuard, ERC2771Conte
require(_targetAuction.endTimestamp <= block.timestamp, "Marketplace: auction still active.");
require(_winningBid.bidder != address(0), "Marketplace: no bids were made.");

_englishAuctionsStorage().payoutStatus[_auctionId].paidOutBidAmount = true;

_closeAuctionForAuctionCreator(_targetAuction, _winningBid);

if (_targetAuction.status != IEnglishAuctions.Status.COMPLETED) {
Expand Down