Skip to content

Commit

Permalink
Merge branch 'feat/lpInfo' of github.com:sushiswap/sushiswap into fea…
Browse files Browse the repository at this point in the history
…t/lpInfo
  • Loading branch information
Clearwood committed Apr 15, 2021
2 parents 1359e13 + ba7d973 commit b92ba29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/MasterChefV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ contract MasterChefV2 is BoringOwnable, BoringBatchable {
if (address(_rewarder) != address(0)) {
_rewarder.onSushiReward(pid, to, 0, user.amount);
}

}

/// @notice Withdraw LP tokens from MCV2.
Expand All @@ -248,7 +247,6 @@ contract MasterChefV2 is BoringOwnable, BoringBatchable {
if (address(_rewarder) != address(0)) {
_rewarder.onSushiReward(pid, msg.sender, 0, user.amount);
}

}

/// @notice Harvest proceeds for transaction sender to `to`.
Expand All @@ -274,9 +272,12 @@ contract MasterChefV2 is BoringOwnable, BoringBatchable {
if (address(_rewarder) != address(0)) {
_rewarder.onSushiReward( pid, to, _pendingSushi, user.amount);
}

}


/// @notice Withdraw LP tokens from MCV2 and harvest proceeds for transaction sender to `to`.
/// @param pid The index of the pool. See `poolInfo`.
/// @param amount LP token amount to withdraw.
/// @param to Receiver of the LP tokens and SUSHI rewards.
function withdrawAndHarvest(uint256 pid, uint256 amount, address to) public {
PoolInfo memory pool = updatePool(pid);
UserInfo storage user = userInfo[pid][msg.sender];
Expand All @@ -298,7 +299,6 @@ contract MasterChefV2 is BoringOwnable, BoringBatchable {
if (address(_rewarder) != address(0)) {
_rewarder.onSushiReward(pid, to, _pendingSushi, user.amount);
}

}

/// @notice Harvests SUSHI from `MASTER_CHEF` MCV1 and pool `MASTER_PID` to this MCV2 contract.
Expand Down

0 comments on commit b92ba29

Please sign in to comment.