Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-merkl committed Mar 4, 2025
1 parent bd8f753 commit e44bdbe
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions contracts/ReferralRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,9 @@ contract ReferralRegistry is UUPSHelper {
paymentToken: _paymentToken
});
if (costReferralProgram > 0) {
// Why don't we just use `costReferralProgram` everywhere instead of `msg.value` ?
// We wouldn't need to check if the value l76 is correct
(bool sent, ) = feeRecipient.call{ value: msg.value }("");
if (!sent) revert Errors.NotEnoughPayment();
}
// Worth emitting the full struct here
emit ReferralKeyAdded(key, referralPrograms[key]);
}

Expand All @@ -109,7 +106,6 @@ contract ReferralRegistry is UUPSHelper {
bool newRequiresRefererToBeSet,
address newPaymentToken
) external {
// Why don't we also check the ` _cost == 0 || (_cost > 0 && _requiresRefererToBeSet)`?
if (referralPrograms[key].owner != msg.sender) revert Errors.NotAllowed();
if (newCost != 0 && !newRequiresRefererToBeSet) revert Errors.InvalidParam();

Expand Down

0 comments on commit e44bdbe

Please sign in to comment.