Weth connector fix

This commit is contained in:
Thrilok Kumar 2022-01-19 04:34:24 +05:30
parent a620279e54
commit 815024ef40
2 changed files with 4 additions and 3 deletions

View File

@ -4,4 +4,5 @@ import { TokenInterface } from "../../common/interfaces.sol";
abstract contract Helpers {
TokenInterface constant internal wethContract = TokenInterface(0x4200000000000000000000000000000000000006);
TokenInterface constant internal wethFixContract = TokenInterface(0x4200000000000000000000000000000000000006);
}

View File

@ -27,7 +27,7 @@ abstract contract Resolver is Events, DSMath, Basic, Helpers {
uint _amt = getUint(getId, amt);
_amt = _amt == uint(-1) ? address(this).balance : _amt;
wethContract.deposit{value: _amt}();
wethFixContract.deposit{value: _amt}();
setUint(setId, _amt);
@ -50,8 +50,8 @@ abstract contract Resolver is Events, DSMath, Basic, Helpers {
uint _amt = getUint(getId, amt);
_amt = _amt == uint(-1) ? wethContract.balanceOf(address(this)) : _amt;
approve(wethContract, wethAddr, _amt);
wethContract.withdraw(_amt);
approve(wethFixContract, wethAddr, _amt);
wethFixContract.withdraw(_amt);
setUint(setId, _amt);