mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
fix
This commit is contained in:
parent
6cff35529b
commit
5e1cc0a7a5
|
@ -159,7 +159,8 @@ abstract contract CompoundV3Resolver is Events, Helpers {
|
|||
);
|
||||
require(from != address(this), "from-cannot-be-address(this)-use-paybackOnBehalf");
|
||||
|
||||
address token_ = token == ethAddr ? wethAddr : token;
|
||||
bool isEth = token == ethAddr;
|
||||
address token_ = isEth? wethAddr : token;
|
||||
|
||||
if (token_ == getBaseToken(market)) {
|
||||
require(
|
||||
|
@ -709,7 +710,8 @@ abstract contract CompoundV3Resolver is Events, Helpers {
|
|||
require(from != address(this), "from-cannot-be-address(this)-use-paybackOnBehalf");
|
||||
|
||||
address token_ = getBaseToken(market);
|
||||
require(token == token_ || token == ethAddr, "invalid-token");
|
||||
bool isEth = token == ethAddr;
|
||||
require(token == token_ || isEth, "invalid-token");
|
||||
|
||||
if (amt_ == uint256(-1)) {
|
||||
amt_ = _calculateFromAmount(
|
||||
|
|
Loading…
Reference in New Issue
Block a user