Skip to content

Commit

Permalink
refactor: correct custom error name
Browse files Browse the repository at this point in the history
  • Loading branch information
andreivladbrg committed Apr 19, 2024
1 parent 629a864 commit 9a409fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/SablierV2OpenEnded.sol
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ contract SablierV2OpenEnded is ISablierV2OpenEnded, NoDelegateCall, SablierV2Ope

// Checks: the new rate per second is not equal to the actual rate per second.
if (newRatePerSecond == oldRatePerSecond) {
revert Errors.SablierV2OpenEnded_ratePerSecondNotDifferent(newRatePerSecond);
revert Errors.SablierV2OpenEnded_RatePerSecondNotDifferent(newRatePerSecond);
}

uint128 recipientAmount = _withdrawableAmountOf(streamId, uint40(block.timestamp));
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Errors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ library Errors {
error SablierV2OpenEnded_RatePerSecondZero();

/// @notice Thrown when trying to change the rate per second with the same rate per second.
error SablierV2OpenEnded_ratePerSecondNotDifferent(uint128 ratePerSecond);
error SablierV2OpenEnded_RatePerSecondNotDifferent(uint128 ratePerSecond);

/// @notice Thrown when trying to create a OpenEnded stream with a zero deposit amount.
error SablierV2OpenEnded_DepositAmountZero();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ contract adjustRatePerSecond_Integration_Test is Integration_Test {
whenratePerSecondNonZero
{
vm.expectRevert(
abi.encodeWithSelector(Errors.SablierV2OpenEnded_ratePerSecondNotDifferent.selector, RATE_PER_SECOND)
abi.encodeWithSelector(Errors.SablierV2OpenEnded_RatePerSecondNotDifferent.selector, RATE_PER_SECOND)
);
openEnded.adjustRatePerSecond({ streamId: defaultStreamId, newRatePerSecond: RATE_PER_SECOND });
}
Expand Down

0 comments on commit 9a409fb

Please sign in to comment.