Skip to content

Commit

Permalink
update compound function
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoushuren committed Mar 20, 2024
1 parent 44d7de5 commit 9dfbe71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/peripherals/FarmRouter2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ contract FarmRouter2 is Ownable, IFlashLoan {
IERC20(_pair).approve(_ulp, 2**256-1);
}

function compound(address _ulp, address _unUlp, address _account, uint8 _lockDay) public {
function compound(address _ulp, address _account, uint8 _lockDay) public {
require( IRewardTracker(_ulp).claimable(_account) > 0, "FarmRouter: claimable cannot be 0");
IRewardTracker(_ulp).claimForAccount(_account, address(this));
address _unTinuPair = UniswapV2Library.pairFor(UNISWAP_FACTORY, UN, TINU);
address _unUlp = uLps[_unTinuPair];
_deposit(_unUlp, UN, _unTinuPair, _lockDay, msg.sender);
}

Expand Down

0 comments on commit 9dfbe71

Please sign in to comment.