From fdc0e7d58a1d074d235285f349e99ce1ebbcbcc9 Mon Sep 17 00:00:00 2001 From: Eric Mastro Date: Tue, 20 Sep 2022 15:56:27 +1000 Subject: [PATCH] proofEnd returns end or past timestamp --- contracts/Marketplace.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/Marketplace.sol b/contracts/Marketplace.sol index a61fd42..4cc1454 100644 --- a/contracts/Marketplace.sol +++ b/contracts/Marketplace.sol @@ -182,10 +182,11 @@ contract Marketplace is Collateral, Proofs { } function proofEnd(bytes32 slotId) public view returns (uint256) { + uint256 end = _end(slotId); if (!_slotAcceptsProofs(slotId)) { - return block.timestamp - 1; + return end < block.timestamp ? end : block.timestamp - 1; } - return _end(slotId); + return end; } function _price(