From 7d8d384a083ee21454af9f1afac78967dcca0ef4 Mon Sep 17 00:00:00 2001 From: andreivladbrg Date: Tue, 14 Nov 2023 15:09:46 +0300 Subject: [PATCH] test: correct invariant withdraw handler --- test/invariant/handlers/OpenEndedHandler.sol | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/invariant/handlers/OpenEndedHandler.sol b/test/invariant/handlers/OpenEndedHandler.sol index bb343754..2167f22b 100644 --- a/test/invariant/handlers/OpenEndedHandler.sol +++ b/test/invariant/handlers/OpenEndedHandler.sol @@ -248,12 +248,6 @@ contract OpenEndedHandler is BaseHandler { return; } - // The protocol doesn't allow zero withdrawal amounts. - uint128 withdrawableAmount = openEnded.withdrawableAmountOf(currentStreamId); - if (withdrawableAmount == 0) { - return; - } - // Bound the time so that it is between last time update and current time. time = uint40(_bound(time, openEnded.getLastTimeUpdate(currentStreamId) + 1, block.timestamp)); @@ -264,7 +258,7 @@ contract OpenEndedHandler is BaseHandler { to = currentRecipient; } - uint128 withdrawAmount = openEnded.streamedAmountOf(currentStreamId, time); + uint128 withdrawAmount = openEnded.withdrawableAmountOf(currentStreamId, time); // Withdraw from the stream. openEnded.withdraw({ streamId: currentStreamId, to: to, time: time });