diff --git a/contracts/contract/rewards/RocketMerkleDistributorMainnet.sol b/contracts/contract/rewards/RocketMerkleDistributorMainnet.sol index 88d2aefb..19f03242 100644 --- a/contracts/contract/rewards/RocketMerkleDistributorMainnet.sol +++ b/contracts/contract/rewards/RocketMerkleDistributorMainnet.sol @@ -72,18 +72,20 @@ contract RocketMerkleDistributorMainnet is RocketBase, RocketRewardsRelayInterfa address rplWithdrawalAddress; address withdrawalAddress; + address senderWithdrawalAddress; // Confirm caller is permitted { RocketNodeManagerInterface rocketNodeManager = RocketNodeManagerInterface(getContractAddress("rocketNodeManager")); rplWithdrawalAddress = rocketNodeManager.getNodeRPLWithdrawalAddress(_nodeAddress); withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(_nodeAddress); + senderWithdrawalAddress = rocketStorage.getNodeWithdrawalAddress(msg.sender); if (rocketNodeManager.getNodeRPLWithdrawalAddressIsSet(_nodeAddress)) { // If RPL withdrawal address is set, must be called from it require(msg.sender == rplWithdrawalAddress, "Can only claim from RPL withdrawal address"); } else { // Otherwise, must be called from node address or withdrawal address - require(msg.sender == _nodeAddress || msg.sender == withdrawalAddress, "Can only claim from node address"); + require(msg.sender == _nodeAddress || msg.sender == withdrawalAddress || senderWithdrawalAddress == _nodeAddress, "Can only claim from node address"); } }