From 232a2ef6b4ac6af9ac8e361363ae88aa8879b8dd Mon Sep 17 00:00:00 2001 From: Pedro Yves Fracari Date: Wed, 24 Jul 2024 09:53:30 -0300 Subject: [PATCH] use PollTryAtEpoch error on gat order --- src/types/GoodAfterTime.sol | 2 +- test/ComposableCoW.gat.t.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/GoodAfterTime.sol b/src/types/GoodAfterTime.sol index ba22161..abae962 100644 --- a/src/types/GoodAfterTime.sol +++ b/src/types/GoodAfterTime.sol @@ -62,7 +62,7 @@ contract GoodAfterTime is BaseConditionalOrder { // Don't allow the order to be placed before it becomes valid. if (!(block.timestamp >= data.startTime)) { - revert IConditionalOrder.PollTryNextBlock(TOO_EARLY); + revert IConditionalOrder.PollTryAtEpoch(data.startTime, TOO_EARLY); } // Require that the sell token balance is above the minimum. diff --git a/test/ComposableCoW.gat.t.sol b/test/ComposableCoW.gat.t.sol index c6b8d29..6aec0e8 100644 --- a/test/ComposableCoW.gat.t.sol +++ b/test/ComposableCoW.gat.t.sol @@ -54,7 +54,7 @@ contract ComposableCoWGatTest is BaseComposableCoWTest { vm.warp(currentTime); // should revert when the current time is before the start time - vm.expectRevert(abi.encodeWithSelector(IConditionalOrder.PollTryNextBlock.selector, TOO_EARLY)); + vm.expectRevert(abi.encodeWithSelector(IConditionalOrder.PollTryAtEpoch.selector, startTime, TOO_EARLY)); gat.getTradeableOrder(address(safe1), address(0), bytes32(0), abi.encode(o), abi.encode(uint256(1e18))); }