Skip to content

Commit

Permalink
fix(RNSCommission): fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
tringuyenskymavis committed Jun 6, 2024
1 parent e2d4138 commit b71cceb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/RNSCommission.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ contract RNSCommission is Initializable, AccessControlEnumerable, INSCommission
sumValue += commissionAmount;

RONTransferHelper.safeTransfer(_commissionInfos[i].recipient, commissionAmount);
emit Transfer(_commissionInfos[i].recipient, commissionAmount);
emit Distributed(_commissionInfos[i].recipient, commissionAmount);
}

// This code send the remaining RON to the last recipient.
if (sumValue < ronAmount) {
RONTransferHelper.safeTransfer(_commissionInfos[lastIdx].recipient, ronAmount - sumValue);
emit Transfer(_commissionInfos[lastIdx].recipient, ronAmount - sumValue);
emit Distributed(_commissionInfos[lastIdx].recipient, ronAmount - sumValue);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/INSCommission.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface INSCommission {
address indexed updatedBy, uint256 indexed commissionIdx, address payable newRecipient, string newName
);
/// @dev Emiited when transfer RON to commission's recipient.
event Transfer(address indexed recipient, uint256 commissionAmount);
event Distributed(address indexed recipient, uint256 commissionAmount);

/// @dev Revert when index is out of range
error InvalidArrayLength();
Expand Down

0 comments on commit b71cceb

Please sign in to comment.