From d26bef29eea11e538dab601495694f0ad04f6865 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Tue, 5 Nov 2024 15:41:24 +0700 Subject: [PATCH] fix(RNSCommission): return if sent RON when zero instead of revert --- src/RNSCommission.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RNSCommission.sol b/src/RNSCommission.sol index 3e1174f..9dc52d1 100644 --- a/src/RNSCommission.sol +++ b/src/RNSCommission.sol @@ -67,7 +67,7 @@ contract RNSCommission is Initializable, AccessControlEnumerable, INSCommission * @dev Helper method to allocate commission and take fee into recipient address. */ function _allocateCommissionAndTransferToRecipient(uint256 ronAmount) internal { - if (ronAmount == 0) revert InvalidAmountOfRON(); + if (ronAmount == 0) return; uint256 length = _commissionInfos.length; if (length == 0) revert InvalidArrayLength();