errors fixes

This commit is contained in:
Richa-iitr 2022-09-02 01:13:59 +05:30
parent c0ea8a5523
commit 866e3456e7
2 changed files with 2 additions and 3 deletions

View File

@ -189,7 +189,8 @@ abstract contract Helpers is DSMath, Basic {
} }
amt = bal_ < allowance_ ? bal_ : allowance_; amt = bal_ < allowance_ ? bal_ : allowance_;
} }
convertEthToWeth(isEth, TokenInterface(token), amt); if (src == address(this))
convertEthToWeth(isEth, TokenInterface(token), amt);
} else { } else {
if (amt == uint256(-1)) { if (amt == uint256(-1)) {
uint256 allowance_ = TokenInterface(token).allowance( uint256 allowance_ = TokenInterface(token).allowance(

View File

@ -481,9 +481,7 @@ abstract contract CompoundV3Resolver is Events, Helpers {
} }
convertEthToWeth(isEth, tokenContract, amt_); convertEthToWeth(isEth, tokenContract, amt_);
approve(tokenContract, market, amt_); approve(tokenContract, market, amt_);
CometInterface(market).supply(token_, amt_); CometInterface(market).supply(token_, amt_);
setUint(setId, amt_); setUint(setId, amt_);