Skip to content

Commit 424031c

Browse files
authored
Merge pull request #54 from uprendis/feature/forbid-rewards-claiming-with-sftm
Forbid rewards claiming with outstanding sFTM
2 parents a162eb6 + 2dedddd commit 424031c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contracts/sfc/SFCLib.sol

+1
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ contract SFCLib is SFCBase {
365365
}
366366

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

0 commit comments

Comments
 (0)