Skip to content

Commit

Permalink
fix(RNSCommission): return if sent RON when zero instead of revert
Browse files Browse the repository at this point in the history
  • Loading branch information
TuDo1403 committed Nov 5, 2024
1 parent c32e8f6 commit d26bef2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RNSCommission.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d26bef2

Please sign in to comment.