Skip to content

Commit

Permalink
Merge pull request #140 from Gearbox-protocol/v3-pendle-mellow
Browse files Browse the repository at this point in the history
fix: prohibit mellow deposits with disallowed underlyings, even with …
  • Loading branch information
Van0k authored Sep 2, 2024
2 parents 3e96f58 + 247e7b6 commit d938b18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/adapters/mellow/MellowVaultAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit d938b18

Please sign in to comment.