Skip to content

Commit

Permalink
Merge pull request #9 from dfx-finance/fix/unzap-eth-withdrawal
Browse files Browse the repository at this point in the history
fix unzap ETH withdrawal issue
  • Loading branch information
hottyage authored Nov 24, 2023
2 parents 47adfd0 + 3bf6382 commit 40b0d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Zap.sol
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ contract Zap {
uint256 baseAmount = base.balanceOf(address(this));
require(baseAmount >= _minTokenAmount, "!Unzap/not-enough-token-amount");
if (address(base) == wETH && _toETH) {
IWETH(wETH).withdraw(quoteAmount);
IWETH(wETH).withdraw(baseAmount);
(bool success,) = payable(msg.sender).call{value: baseAmount}("");
require(success, "zap/unzap-to-eth-failed");
} else {
Expand Down

0 comments on commit 40b0d01

Please sign in to comment.