contracts icon indicating copy to clipboard operation
contracts copied to clipboard

isAuctionExpired view function is with wrong return value

Open karacurt opened this issue 1 year ago • 0 comments

The actual function is considering active auctions as expired (if endTimestamp is in the future)

  function isAuctionExpired(uint256 _auctionId) external view onlyExistingAuction(_auctionId) returns (bool) {
        return _englishAuctionsStorage().auctions[_auctionId].endTimestamp >= block.timestamp;
    } 

The correct conditional should be to check if endTimestamp is in the past, and then return true for expired.

I opened a PR with the fix here

karacurt avatar May 05 '24 00:05 karacurt