mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
Weth connector fix
This commit is contained in:
parent
a620279e54
commit
815024ef40
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user