diff --git a/contracts/adapters/mellow/MellowVaultAdapter.sol b/contracts/adapters/mellow/MellowVaultAdapter.sol index ce2a9aee..923937ea 100644 --- a/contracts/adapters/mellow/MellowVaultAdapter.sol +++ b/contracts/adapters/mellow/MellowVaultAdapter.sol @@ -50,7 +50,7 @@ contract MellowVaultAdapter is AbstractAdapter, IMellowVaultAdapter { if (amounts.length != len) revert IncorrectArrayLengthException(); // U:[MEL-3] for (uint256 i = 0; i < len;) { - if (amounts[i] > 0 && !isUnderlyingAllowed[underlyings[i]]) { + if (!isUnderlyingAllowed[underlyings[i]]) { revert UnderlyingNotAllowedException(underlyings[i]); // U:[MEL-3] } diff --git a/contracts/test/unit/adapters/mellow/MellowVaultAdapter.unit.t.sol b/contracts/test/unit/adapters/mellow/MellowVaultAdapter.unit.t.sol index 8ee6e1d1..079282c6 100644 --- a/contracts/test/unit/adapters/mellow/MellowVaultAdapter.unit.t.sol +++ b/contracts/test/unit/adapters/mellow/MellowVaultAdapter.unit.t.sol @@ -78,7 +78,7 @@ contract MellowVaultAdapterUnitTest is vm.prank(creditFacade); adapter.deposit(address(0), incorrectAmounts, 0, 789); - amounts[1] = 0; + _setUnderlyingsStatus(3); address[] memory tokensToApprove = new address[](1); tokensToApprove[0] = tokens[0];