diff --git a/src/Snippets.sol b/src/Snippets.sol index 2d6b5bc..cb7ed5c 100644 --- a/src/Snippets.sol +++ b/src/Snippets.sol @@ -246,6 +246,7 @@ contract Snippets { ); address onBehalf = user; address receiver = user; + morpho.withdrawCollateral(marketParams, amount, onBehalf, receiver); } @@ -269,6 +270,7 @@ contract Snippets { uint256 shares = 0; address onBehalf = user; address receiver = user; + (assetsWithdrawn, sharesWithdrawn) = morpho.withdraw( marketParams, amount, diff --git a/test/forge/TestIntegrationSnippets.sol b/test/forge/TestIntegrationSnippets.sol index 40edc2e..2fece83 100644 --- a/test/forge/TestIntegrationSnippets.sol +++ b/test/forge/TestIntegrationSnippets.sol @@ -253,10 +253,10 @@ contract TestIntegrationSnippets is BaseTest { function testHealthfactor0Borrow( uint256 amountSupplied, - uint256 amountBorrowed, uint256 timeElapsed, uint256 fee ) public { + uint256 amountBorrowed; vm.assume(amountBorrowed == 0); _generatePendingInterest( amountSupplied,