Skip to content

Commit

Permalink
fix: zokyo l14
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyonline committed Oct 21, 2024
1 parent dabe169 commit 225b9fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ynEIGEN/TokenStakingNode.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ contract TokenStakingNode is
error NotStrategyManager();
error NotTokenStakingNodeDelegator();
error NotTokenStakingNodesWithdrawer();
error ArrayLengthMismatch();

//--------------------------------------------------------------------------------------
//---------------------------------- VARIABLES ---------------------------------------
Expand Down Expand Up @@ -98,10 +99,15 @@ contract TokenStakingNode is
uint256[] calldata amounts,
IStrategy[] calldata strategies
) external nonReentrant onlyYieldNestStrategyManager {

uint256 assetsLength = assets.length;
if (assetsLength != amounts.length || assetsLength != strategies.length) {
revert ArrayLengthMismatch();
}

IStrategyManager strategyManager = tokenStakingNodesManager
.strategyManager();

uint256 assetsLength = assets.length;
for (uint256 i = 0; i < assetsLength; i++) {
IERC20 asset = assets[i];
uint256 amount = amounts[i];
Expand Down

0 comments on commit 225b9fc

Please sign in to comment.