Skip to content

Commit

Permalink
Removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Dec 15, 2022
1 parent e91e8bc commit ad7d519
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 46 deletions.
2 changes: 1 addition & 1 deletion src/compound/SupplyVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ contract SupplyVault is ISupplyVault, SupplyVaultBase {
if (rewardsIndexDiff > 0) {
unclaimed += balanceOf(_user).mulWadDown(rewardsIndexDiff);
userRewardsData.unclaimed = unclaimed.safeCastTo128();
userRewardsData.index = _newRewardsIndex.safeCastTo128(); // TODO: why was this line outside the if?
userRewardsData.index = _newRewardsIndex.safeCastTo128();

emit Accrued(_user, _newRewardsIndex, unclaimed);
}
Expand Down
15 changes: 0 additions & 15 deletions test/aave-v2/TestSupplyVault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -168,21 +168,6 @@ contract TestSupplyVault is TestSetupVaults {
vaultSupplier1.redeemVault(daiSupplyVault, shares + 1);
}

// TODO: fix this test by using updated indexes in previewMint
// function testShouldMintCorrectAmountWhenMorphoPoolIndexesOutdated() public {
// uint256 amount = 10_000 ether;

// vaultSupplier1.depositVault(daiSupplyVault, amount);

// vm.roll(block.number + 100_000);
// vm.warp(block.timestamp + 1_000_000);

// uint256 assets = vaultSupplier2.mintVault(daiSupplyVault, amount);
// uint256 shares = vaultSupplier2.withdrawVault(daiSupplyVault, assets);

// assertEq(shares, amount, "unexpected redeemed shares");
// }

function testShouldDepositCorrectAmountWhenMorphoPoolIndexesOutdated() public {
uint256 amount = 10_000 ether;

Expand Down
15 changes: 0 additions & 15 deletions test/aave-v3/TestSupplyVault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -798,21 +798,6 @@ contract TestSupplyVault is TestSetupVaults {
// In the end, vaultSupplier1 got 2 * X rewards while vaultSupplier2 got 3 * X
}

// TODO: fix this test by using updated indexes in previewMint
// function testShouldMintCorrectAmountWhenMorphoPoolIndexesOutdated() public {
// uint256 amount = 10_000 ether;

// vaultSupplier1.depositVault(daiSupplyVault, amount);

// vm.roll(block.number + 100_000);
// vm.warp(block.timestamp + 1_000_000);

// uint256 assets = vaultSupplier2.mintVault(daiSupplyVault, amount);
// uint256 shares = vaultSupplier2.withdrawVault(daiSupplyVault, assets);

// assertEq(shares, amount, "unexpected redeemed shares");
// }

function testShouldDepositCorrectAmountWhenMorphoPoolIndexesOutdated() public {
uint256 amount = 10_000 ether;

Expand Down
15 changes: 0 additions & 15 deletions test/compound/TestSupplyVault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -469,21 +469,6 @@ contract TestSupplyVault is TestSetupVaults {
assertApproxEqAbs(uint256(userReward1_1), userReward1_2, 1);
}

// TODO: fix this test by using updated indexes in previewMint
// function testShouldMintCorrectAmountWhenMorphoPoolIndexesOutdated() public {
// uint256 amount = 10_000 ether;

// vaultSupplier1.depositVault(daiSupplyVault, amount);

// vm.roll(block.number + 100_000);
// vm.warp(block.timestamp + 1_000_000);

// uint256 assets = vaultSupplier2.mintVault(daiSupplyVault, amount);
// uint256 shares = vaultSupplier2.withdrawVault(daiSupplyVault, assets);

// assertEq(shares, amount, "unexpected redeemed shares");
// }

function testShouldDepositCorrectAmountWhenMorphoPoolIndexesOutdated() public {
uint256 amount = 10_000 ether;

Expand Down

0 comments on commit ad7d519

Please sign in to comment.