Skip to content

Commit

Permalink
forbid to claim rewards with outstanding sFTM balance
Browse files Browse the repository at this point in the history
  • Loading branch information
uprendis committed Dec 27, 2022
1 parent a162eb6 commit 2dedddd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contracts/sfc/SFCLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ contract SFCLib is SFCBase {
}

function _claimRewards(address delegator, uint256 toValidatorID) internal returns (Rewards memory rewards) {
require(_checkAllowedToWithdraw(delegator, toValidatorID), "outstanding sFTM balance");
_stashRewards(delegator, toValidatorID);
rewards = _rewardsStash[delegator][toValidatorID];
uint256 totalReward = rewards.unlockedReward.add(rewards.lockupBaseReward).add(rewards.lockupExtraReward);
Expand Down

0 comments on commit 2dedddd

Please sign in to comment.