Skip to content

Commit

Permalink
fix the error in 'stEthRequestWithdrawal'
Browse files Browse the repository at this point in the history
  • Loading branch information
seongyun-ko committed Oct 16, 2024
1 parent 6bb7c5a commit d6aede3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Liquifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ contract Liquifier is Initializable, UUPSUpgradeable, OwnableUpgradeable, Pausab
error NotRegistered();
error WrongOutput();
error IncorrectCaller();
error IncorrectAmount();

/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
Expand Down Expand Up @@ -213,7 +214,8 @@ contract Liquifier is Initializable, UUPSUpgradeable, OwnableUpgradeable, Pausab
}

function stEthRequestWithdrawal(uint256 _amount) public onlyAdmin returns (uint256[] memory) {
if (_amount < lidoWithdrawalQueue.MIN_STETH_WITHDRAWAL_AMOUNT() || _amount < lido.balanceOf(address(this))) revert NotEnoughBalance();
if (_amount < lidoWithdrawalQueue.MIN_STETH_WITHDRAWAL_AMOUNT()) revert IncorrectAmount();
if (_amount > lido.balanceOf(address(this))) revert NotEnoughBalance();

tokenInfos[address(lido)].ethAmountPendingForWithdrawals += uint128(_amount);

Expand Down

0 comments on commit d6aede3

Please sign in to comment.