Skip to content

Commit

Permalink
test: correct invariant withdraw handler
Browse files Browse the repository at this point in the history
  • Loading branch information
andreivladbrg committed Nov 14, 2023
1 parent 3db8157 commit 7d8d384
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions test/invariant/handlers/OpenEndedHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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 });
Expand Down

0 comments on commit 7d8d384

Please sign in to comment.