Skip to content

Commit

Permalink
fix: update last total asset in updatewithdrawqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Grimal committed Dec 7, 2023
1 parent 303271e commit ea23c3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MetaMorpho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ contract MetaMorpho is ERC4626, ERC20Permit, Ownable2Step, Multicall, IMetaMorph
/// simply bundle a reallocation that withdraws max from this market with a call to `sortWithdrawQueue`.
/// @param indexes The indexes of each market in the previous withdraw queue, in the new withdraw queue's order.
function updateWithdrawQueue(uint256[] calldata indexes) external onlyAllocatorRole {
_updateLastTotalAssets(_accrueFee());

uint256 newLength = indexes.length;
uint256 currLength = withdrawQueue.length;

Expand Down Expand Up @@ -381,6 +383,8 @@ contract MetaMorpho is ERC4626, ERC20Permit, Ownable2Step, Multicall, IMetaMorph

withdrawQueue = newWithdrawQueue;

_updateLastTotalAssets(totalAssets());

emit EventsLib.SetWithdrawQueue(_msgSender(), newWithdrawQueue);
}

Expand Down

0 comments on commit ea23c3f

Please sign in to comment.