Skip to content

Commit

Permalink
remove duped increase operator scaled shares
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Sep 13, 2024
1 parent 432fefe commit 527b6f9
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/contracts/core/DelegationManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -685,31 +685,8 @@ contract DelegationManager is
* The return value will be lower than the input value in the case where the staker has an existing share deficit
*/
(shares, existingShares) = eigenPodManager.addShares({podOwner: staker, shares: shares});
address podOwnerOperator = delegatedTo[staker];
// Similar to `isDelegated` logic
if (podOwnerOperator != address(0)) {
_increaseOperatorScaledShares({
operator: podOwnerOperator,
// the 'staker' here is the address receiving new shares
staker: staker,
strategy: withdrawal.strategies[i],
shares: shares,
totalMagnitude: totalMagnitudes[i]
});
}
} else {
existingShares = strategyManager.addShares(msg.sender, tokens[i], withdrawal.strategies[i], shares);
// Similar to `isDelegated` logic
if (currentOperator != address(0)) {
_increaseOperatorScaledShares({
operator: currentOperator,
// the 'staker' here is the address receiving new shares
staker: msg.sender,
strategy: withdrawal.strategies[i],
shares: shares,
totalMagnitude: totalMagnitudes[i]
});
}
}
}
}
Expand Down

0 comments on commit 527b6f9

Please sign in to comment.