From 937d4ac5522fa4abb3dc4eff7557c6d6e3a7223b Mon Sep 17 00:00:00 2001 From: Roberto Cano <3525807+robercano@users.noreply.github.com> Date: Thu, 23 May 2024 11:25:23 +0200 Subject: [PATCH] fix: support weth for aavelike borrow (#287) --- .../helpers/aaveV3Like/AAVEv3LikeBaseProtocolPlugin.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sdk/protocol-plugins/src/plugins/common/helpers/aaveV3Like/AAVEv3LikeBaseProtocolPlugin.ts b/sdk/protocol-plugins/src/plugins/common/helpers/aaveV3Like/AAVEv3LikeBaseProtocolPlugin.ts index 8fae171d03..eae3d2718b 100644 --- a/sdk/protocol-plugins/src/plugins/common/helpers/aaveV3Like/AAVEv3LikeBaseProtocolPlugin.ts +++ b/sdk/protocol-plugins/src/plugins/common/helpers/aaveV3Like/AAVEv3LikeBaseProtocolPlugin.ts @@ -18,7 +18,7 @@ import { import { AllowedProtocolNames } from './AAVEv3LikeBuilderTypes' import { BigNumber } from 'bignumber.js' import { PRECISION_BI, UNCAPPED_SUPPLY } from '../../constants/AaveV3LikeConstants' -import { CommonTokenSymbols, IChainInfo, IToken } from '@summerfi/sdk-common/common' +import { IChainInfo, IToken } from '@summerfi/sdk-common/common' import { ICollateralInfo } from '@summerfi/sdk-common/protocols' import { ChainContractsProvider, GenericAbiMap } from '../../../utils/ChainContractProvider' import { IProtocolPluginContext } from '@summerfi/protocol-plugins-common' @@ -209,10 +209,6 @@ export abstract class AAVEv3LikeBaseProtocolPlugin< caps: { borrowCap }, data: { totalVariableDebt, totalStableDebt, variableBorrowRate }, } = asset - if (quoteToken.symbol === CommonTokenSymbols.WETH) { - // WETH can be used as collateral on AaveV3 but not borrowed. - return - } try { const RESERVE_FACTOR_TO_PERCENTAGE_DIVISOR = 10000n