Skip to content

Commit

Permalink
fix(Staking): Pool admin restriction bypass via redelegate function
Browse files Browse the repository at this point in the history
  • Loading branch information
TuDo1403 committed Feb 17, 2025
1 parent 4a7b1cd commit 8c475ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ronin/staking/DelegatorStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ abstract contract DelegatorStaking is BaseStaking, IDelegatorStaking {
uint256 amount
) external nonReentrant poolOfConsensusIsActive(consensusAddrDst) {
address delegator = msg.sender;
if (isAdminOfActivePool(msg.sender)) revert ErrAdminOfAnyActivePoolForbidden(msg.sender);
_undelegate(consensusAddrSrc, _poolDetail[__css2cid(consensusAddrSrc)], delegator, amount);
_delegate(_poolDetail[__css2cid(consensusAddrDst)], delegator, amount);
}
Expand Down

0 comments on commit 8c475ae

Please sign in to comment.