Skip to content

Commit

Permalink
fix order
Browse files Browse the repository at this point in the history
  • Loading branch information
hpmaxi committed Feb 13, 2025
1 parent 7072492 commit c2b7d09
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/ynEIGEN/EigenStrategyManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -219,20 +219,21 @@ contract EigenStrategyManager is

// 1. who
function syncBalances() external onlyRole(STRATEGY_CONTROLLER_ROLE) {

IERC20[] memory assets = IynEigenVars(address(ynEigen)).assetRegistry().getAssets();
uint256 assetsLength = assets.length;
for (uint256 i = 0; i < assetsLength; i++) {
_updateTokenStakingNodesBalances(assets[i], IStrategy(address(0)));
}

ITokenStakingNode[] memory nodes = tokenStakingNodesManager.getAllNodes();
uint256 nodesCount = nodes.length;

for (uint256 i; i < nodesCount; i++ ) {
ITokenStakingNode node = nodes[i];
// node.synchronize();
}

IERC20[] memory assets = IynEigenVars(address(ynEigen)).assetRegistry().getAssets();
uint256 assetsLength = assets.length;
for (uint256 i = 0; i < assetsLength; i++) {
_updateTokenStakingNodesBalances(assets[i], IStrategy(address(0)));
}


}

/// @notice Updates the staked balances for all nodes for a strategies.
Expand Down

0 comments on commit c2b7d09

Please sign in to comment.