Skip to content

Commit

Permalink
fix: revert earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Grimal committed Dec 28, 2023
1 parent 14a4d7d commit 810d0a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/MetaMorpho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ contract MetaMorpho is ERC4626, ERC20Permit, Ownable2Step, Multicall, IMetaMorph
Id id = withdrawQueue[i];

if (config[id].cap != 0) revert ErrorsLib.InvalidMarketRemovalNonZeroCap(id);
if (pendingCap[id].validAt != 0) revert ErrorsLib.PendingCap(id);

if (MORPHO.supplyShares(id, address(this)) != 0) {
if (config[id].removableAt == 0) revert ErrorsLib.InvalidMarketRemovalNonZeroSupply(id);
Expand All @@ -354,8 +355,6 @@ contract MetaMorpho is ERC4626, ERC20Permit, Ownable2Step, Multicall, IMetaMorph
}
}

if (pendingCap[id].validAt != 0) revert ErrorsLib.PendingCap(id);

delete config[id];
}
}
Expand Down

0 comments on commit 810d0a2

Please sign in to comment.