From dd3c43d9da0ca1757074ae45e8a47dcec71b35e4 Mon Sep 17 00:00:00 2001 From: Lance Whatley Date: Wed, 16 Feb 2022 09:34:28 -0500 Subject: [PATCH] Add token arg to override --- contracts/OKLGRewardsDistributor.sol | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/contracts/OKLGRewardsDistributor.sol b/contracts/OKLGRewardsDistributor.sol index 4ab9320..3fb9b71 100644 --- a/contracts/OKLGRewardsDistributor.sol +++ b/contracts/OKLGRewardsDistributor.sol @@ -478,15 +478,16 @@ contract OKLGRewardDistributor is IOKLGRewardDistributor, OKLGWithdrawable { minSecondsBeforeUnstake = _seconds; } - function stakeOverride(address[] memory users, Share[] memory shareholderInfo) - external - onlyOwner - { + function stakeOverride( + address token, + address[] memory users, + Share[] memory shareholderInfo + ) external onlyOwner { require(users.length == shareholderInfo.length, 'must be same length'); uint256[] memory _empty = new uint256[](0); for (uint256 i = 0; i < users.length; i++) { shares[users[i]].nftBoostTokenIds = shareholderInfo[i].nftBoostTokenIds; - _stake(users[i], address(0), shareholderInfo[i].amountBase, _empty, true); + _stake(users[i], token, shareholderInfo[i].amountBase, _empty, true); } }