diff --git a/packages/dma-library/src/strategies/aave/multiply/adjust/types.ts b/packages/dma-library/src/strategies/aave/multiply/adjust/types.ts index ca1457108..c62d66f18 100644 --- a/packages/dma-library/src/strategies/aave/multiply/adjust/types.ts +++ b/packages/dma-library/src/strategies/aave/multiply/adjust/types.ts @@ -9,7 +9,7 @@ import { } from '@dma-library/types' import { WithV2Protocol, WithV3Protocol } from '@dma-library/types/aave/protocol' import { - WithAaveStrategyDependencies, + WithAaveMultiplyStrategyDependencies, WithDebug, WithSwap, } from '@dma-library/types/strategy-params' @@ -18,7 +18,7 @@ import BigNumber from 'bignumber.js' export type AaveAdjustArgs = IPositionTransitionArgs & WithPositionType export type ExtendedAaveAdjustArgs = AaveAdjustArgs & WithFlashloanToken -export type AaveAdjustSharedDependencies = WithAaveStrategyDependencies & +export type AaveAdjustSharedDependencies = WithAaveMultiplyStrategyDependencies & WithSwap & Partial export type AaveV2AdjustDependencies = AaveAdjustSharedDependencies & WithV2Protocol diff --git a/packages/dma-library/src/strategies/aave/multiply/open/types.ts b/packages/dma-library/src/strategies/aave/multiply/open/types.ts index 1b0ea35cf..2b6e12dc9 100644 --- a/packages/dma-library/src/strategies/aave/multiply/open/types.ts +++ b/packages/dma-library/src/strategies/aave/multiply/open/types.ts @@ -1,6 +1,6 @@ import { AAVETokens, PositionType } from '@dma-library/types' import { WithV2Protocol, WithV3Protocol } from '@dma-library/types/aave/protocol' -import { WithAaveStrategyDependencies, WithSwap } from '@dma-library/types/strategy-params' +import { WithAaveMultiplyStrategyDependencies, WithSwap } from '@dma-library/types/strategy-params' import { IRiskRatio } from '@domain' import BigNumber from 'bignumber.js' @@ -16,10 +16,10 @@ export interface AaveOpenArgs { debtToken: { symbol: AAVETokens; precision?: number } } -export type AaveV2OpenDependencies = Omit & +export type AaveV2OpenDependencies = Omit & WithV2Protocol & WithSwap -export type AaveV3OpenDependencies = Omit & +export type AaveV3OpenDependencies = Omit & WithV3Protocol & WithSwap export type AaveOpenDependencies = AaveV2OpenDependencies | AaveV3OpenDependencies diff --git a/packages/dma-library/src/types/strategy-params.ts b/packages/dma-library/src/types/strategy-params.ts index 9e354def4..5034a442b 100644 --- a/packages/dma-library/src/types/strategy-params.ts +++ b/packages/dma-library/src/types/strategy-params.ts @@ -111,17 +111,24 @@ type SharedStrategyDependencies = { currentPosition: IPosition proxy: Address user: Address - isDPMProxy: boolean network: Network } + export type WithAaveStrategyDependencies = { addresses: AaveLikeStrategyAddresses } & SharedStrategyDependencies + +export type WithAaveMultiplyStrategyDependencies = WithAaveStrategyDependencies & WithDPMFlag + export type WithAaveLikeStrategyDependencies = { addresses: AaveLikeStrategyAddresses } & SharedStrategyDependencies & WithAaveLikeProtocolType +export type WithDPMFlag = { + isDPMProxy: boolean +} + export type WithSwap = { getSwapData: ( fromToken: string,