Skip to content

Commit

Permalink
fix: Do not delete the entire stream data when caancelling the stream
Browse files Browse the repository at this point in the history
  • Loading branch information
mgnfy-view committed Oct 29, 2024
1 parent 8f5b0c4 commit 81aa310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PayStreams.sol
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ contract PayStreams is Ownable, IPayStreams {
IHooks(streamData.streamerVault).beforeStreamClosed(_streamHash);
}

delete s_streamData[_streamHash];
s_streamData[_streamHash].amount = 0;

if (streamData.streamerVault != address(0) && streamerHookConfig.callAfterStreamClosed) {
IHooks(streamData.streamerVault).afterStreamClosed(_streamHash);
Expand Down

0 comments on commit 81aa310

Please sign in to comment.