Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
andresaiello committed Jan 30, 2024
1 parent c45ffd1 commit abe83cc
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,30 @@ contract InvitationManager {
error IndexOutOfBounds();
error CanNotInviteYourself();

event UserVerified(address indexed userAddress, uint256 verifiedAt);
event UserVerified(address indexed userAddress, uint256 verifiedAt, uint256 unix_timestamp);
event InvitationAccepted(
address indexed inviter,
address indexed invitee,
uint256 index,
uint256 expiration,
uint256 acceptedAt
uint256 acceptedAt,
uint256 unix_timestamp
);

function _markAsVerified(address user) internal {
// Check if the user is already verified
if (userVerificationTimestamps[user] > 0) revert UserAlreadyVerified();

userVerificationTimestamps[user] = block.timestamp;
emit UserVerified(user, block.timestamp);
emit UserVerified(user, block.timestamp, block.timestamp);
}

function markAsVerified() external {
_markAsVerified(msg.sender);
invitationEnabled[msg.sender] = true;
}

function udpateInvitationStatus(bool value) external {
function updateInvitationStatus(bool value) external {
if (userVerificationTimestamps[msg.sender] == 0) revert UserNotVerified();
invitationEnabled[msg.sender] = value;
}
Expand Down Expand Up @@ -95,7 +96,14 @@ contract InvitationManager {
totalInvitesByDay[dayStartTimestamp]++;
totalInvitesByInviterByDay[inviter][dayStartTimestamp]++;

emit InvitationAccepted(inviter, msg.sender, inviteeLists[inviter].length - 1, expiration, block.timestamp);
emit InvitationAccepted(
inviter,
msg.sender,
inviteeLists[inviter].length - 1,
expiration,
block.timestamp,
block.timestamp
);
}

function getInviteeCount(address inviter) external view returns (uint256) {
Expand Down

0 comments on commit abe83cc

Please sign in to comment.