add bid claim weth 2 eth support

This commit is contained in:
牛涛涛
2021-01-08 17:41:36 +08:00
parent 01b73b5ca9
commit 051dc73eb3
7 changed files with 76 additions and 16 deletions

View File

@@ -52,6 +52,18 @@ contract DODOCalleeHelper is ReentrancyGuard {
_withdraw(assetTo, _quoteToken, amount, _quoteToken == _WETH_);
}
function CPClaimBidCall(
address payable assetTo,
uint256 baseAmount,
uint256 quoteAmount,
bytes calldata
) external preventReentrant {
address _baseToken = IDODOV2(msg.sender)._BASE_TOKEN_();
address _quoteToken = IDODOV2(msg.sender)._QUOTE_TOKEN_();
_withdraw(assetTo, _baseToken, baseAmount, _baseToken == _WETH_);
_withdraw(assetTo, _quoteToken, quoteAmount, _quoteToken == _WETH_);
}
function _withdraw(
address payable to,
address token,