Skip to content

Commit

Permalink
periphery: fix bug in pre-launch claimVeTokens
Browse files Browse the repository at this point in the history
  • Loading branch information
kyriediculous committed Jul 23, 2024
1 parent 2d8cbbe commit 8f7e18d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/periphery/PreLaunch.sol
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ contract PreLaunch is Initializable, OwnableUpgradeable, UUPSUpgradeable {
uint256 epochsElapsedSinceClaimable = (block.timestamp - claimableTimestamp) / EPOCH_LENGTH;
uint256 lpEthAmount = lockup.amount * lpEthReceived / totalDeposits;
SafeTransferLib.safeApprove(lpEth, votingEscrow, lpEthAmount);
VotingEscrow(votingEscrow).lockFor(msg.sender, lpEthAmount, lockup.duration - epochsElapsedSinceClaimable);
if (lockup.duration > epochsElapsedSinceClaimable) {
VotingEscrow(votingEscrow).lockFor(msg.sender, lpEthAmount, lockup.duration - epochsElapsedSinceClaimable);
} else {
ERC20(LpETH(lpEth).lpToken()).transfer(msg.sender, lpEthAmount);
}
delete lockups[msg.sender];
}

Expand Down

0 comments on commit 8f7e18d

Please sign in to comment.