From 9a409fb15c4162a977192d790f5e550537c34ed1 Mon Sep 17 00:00:00 2001 From: andreivladbrg Date: Fri, 19 Apr 2024 17:38:35 +0300 Subject: [PATCH] refactor: correct custom error name --- src/SablierV2OpenEnded.sol | 2 +- src/libraries/Errors.sol | 2 +- .../adjust-rate-per-second/adjustRatePerSecond.t.sol | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SablierV2OpenEnded.sol b/src/SablierV2OpenEnded.sol index d8fe51f0..3738b14d 100644 --- a/src/SablierV2OpenEnded.sol +++ b/src/SablierV2OpenEnded.sol @@ -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)); diff --git a/src/libraries/Errors.sol b/src/libraries/Errors.sol index 9aff115b..9317ee39 100644 --- a/src/libraries/Errors.sol +++ b/src/libraries/Errors.sol @@ -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(); diff --git a/test/integration/adjust-rate-per-second/adjustRatePerSecond.t.sol b/test/integration/adjust-rate-per-second/adjustRatePerSecond.t.sol index 769a9a2a..9860030f 100644 --- a/test/integration/adjust-rate-per-second/adjustRatePerSecond.t.sol +++ b/test/integration/adjust-rate-per-second/adjustRatePerSecond.t.sol @@ -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 }); }