Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinEgalite committed Oct 13, 2023
1 parent 7a557e1 commit 0b5b148
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/MetaMorpho.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity 0.8.21;

import "forge-std/console2.sol";

import {IMorphoMarketParams} from "./interfaces/IMorphoMarketParams.sol";
import {
IMetaMorpho, MarketConfig, PendingUint192, PendingAddress, MarketAllocation
Expand Down Expand Up @@ -573,6 +575,12 @@ contract MetaMorpho is ERC4626, ERC20Permit, Ownable2Step, Multicall, IMetaMorph
function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view override returns (uint256) {
(uint256 feeShares, uint256 newTotalAssets) = _accruedFeeShares();

console2.log("shares", shares);
console2.log("totalSupply()", totalSupply());
console2.log("feeShares", feeShares);
console2.log("totalSupply() + feeShares", totalSupply() + feeShares);
console2.log("newTotalAssets", newTotalAssets);

return _convertToAssetsWithFeeAccrued(shares, totalSupply() + feeShares, newTotalAssets, rounding);
}

Expand Down
2 changes: 1 addition & 1 deletion test/forge/FeeTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,6 @@ contract FeeTest is BaseTest {
uint256 assets = vault.convertToAssets(shares);

assertEq(assets, expectedAssets, "assets");
//assertGt(assets, assetsBefore, "assets increased");
assertGe(assets, assetsBefore, "assets increased");
}
}

0 comments on commit 0b5b148

Please sign in to comment.