Skip to content

Commit

Permalink
Delete the reward recipient on completion
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpringle committed Nov 22, 2024
1 parent e5e25b2 commit ce3b7f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/validator-manager/PoSValidatorManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ abstract contract PoSValidatorManager is

address owner = $._posValidatorInfo[validationID].owner;
address rewardRecipient = $._rewardRecipients[validationID];
delete $._rewardRecipients[validationID];

// the reward-recipient should always be set, but just in case it isn't, we won't burn the reward
if (rewardRecipient == address(0)) {
Expand Down Expand Up @@ -889,6 +890,7 @@ abstract contract PoSValidatorManager is
delete $._delegatorStakes[delegationID];

address rewardRecipient = $._delegatorRewardRecipients[delegationID];
delete $._delegatorRewardRecipients[delegationID];

if (rewardRecipient == address(0)) {
rewardRecipient = delegator.owner;
Expand Down

0 comments on commit ce3b7f8

Please sign in to comment.