From da1ffbb285479444c09fcc8076f7b90b2fdcf7e0 Mon Sep 17 00:00:00 2001 From: Richa-iitr Date: Wed, 7 Sep 2022 22:28:41 +0530 Subject: [PATCH] import-fix --- contracts/mainnet/connectors/compound/v3/main.sol | 4 ++-- test/mainnet/compound-import/compound-v3-import.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/mainnet/connectors/compound/v3/main.sol b/contracts/mainnet/connectors/compound/v3/main.sol index 82f2d8d6..8d76a927 100644 --- a/contracts/mainnet/connectors/compound/v3/main.sol +++ b/contracts/mainnet/connectors/compound/v3/main.sol @@ -811,7 +811,7 @@ abstract contract CompoundV3Resolver is Events, Helpers { address token_ = token == ethAddr ? wethAddr : token; - amt_ = amt_ == uint256(-1) ? _getAccountSupplyBalanceOfAsset(address(this), market, token) : amt_; + amt_ = amt_ == uint256(-1) ? _getAccountSupplyBalanceOfAsset(address(this), market, token_) : amt_; CometInterface(market).transferAssetFrom(address(this), dest, token_, amt_); @@ -853,7 +853,7 @@ abstract contract CompoundV3Resolver is Events, Helpers { address token_ = token == ethAddr ? wethAddr : token; - amt_ = amt_ == uint256(-1) ? _getAccountSupplyBalanceOfAsset(src, market, token) : amt_; + amt_ = amt_ == uint256(-1) ? _getAccountSupplyBalanceOfAsset(src, market, token_) : amt_; CometInterface(market).transferAssetFrom(src, dest, token_, amt_); diff --git a/test/mainnet/compound-import/compound-v3-import.test.ts b/test/mainnet/compound-import/compound-v3-import.test.ts index 59f32efe..bf206675 100644 --- a/test/mainnet/compound-import/compound-v3-import.test.ts +++ b/test/mainnet/compound-import/compound-v3-import.test.ts @@ -344,7 +344,7 @@ describe("Import Compound v3 Position", function () { { connector: "COMPOUND-V3-X", method: "transferAssetOnBehalf", - args: [market, tokens.weth.address, wallet.address, dsaWallet0.address, ethers.constants.MaxUint256, 0, 0] + args: [market, tokens.eth.address, wallet.address, dsaWallet0.address, ethers.constants.MaxUint256, 0, 0] }, { connector: "COMPOUND-V3-X",