diff --git a/actions/aave/open/get-open-deposit-borrow-position-parameters.ts b/actions/aave/open/get-open-deposit-borrow-position-parameters.ts index 47340d2e3b..6185ac797c 100644 --- a/actions/aave/open/get-open-deposit-borrow-position-parameters.ts +++ b/actions/aave/open/get-open-deposit-borrow-position-parameters.ts @@ -2,17 +2,16 @@ import { IOpenDepositBorrowStrategy, strategies } from '@oasisdex/dma-library' import { getTokenAddresses } from 'actions/aave/get-token-addresses' import { networkIdToLibraryNetwork } from 'actions/aave/helpers' import { OpenAaveDepositBorrowParameters } from 'actions/aave/types' -import { getOnChainPosition } from 'actions/aave/view' import { getRpcProvider, NetworkIds } from 'blockchain/networks' import { getToken } from 'blockchain/tokensMetadata' import { amountToWei } from 'blockchain/utils' -import { LendingProtocol } from 'lendingProtocols' function assertNetwork(networkId: NetworkIds): asserts networkId is NetworkIds.MAINNET { if (networkId !== NetworkIds.MAINNET) { throw new Error('Open simple borrow position works only on Ethereum Mainnet') } } + export async function getOpenDepositBorrowPositionParameters( args: OpenAaveDepositBorrowParameters, ): Promise { @@ -49,14 +48,6 @@ export async function getOpenDepositBorrowPositionParameters( }, } - const onChainPosition = await getOnChainPosition({ - networkId, - proxyAddress, - collateralToken, - debtToken, - protocol: LendingProtocol.AaveV3, - }) - const deps: types[1] = { addresses: getTokenAddresses(networkId), provider: getRpcProvider(networkId), @@ -64,7 +55,6 @@ export async function getOpenDepositBorrowPositionParameters( user: userAddress, network: networkIdToLibraryNetwork(networkId), positionType: 'Borrow' as const, - currentPosition: onChainPosition, } return await strategies.aave.v3.openDepositBorrow(libArgs, deps) diff --git a/package.json b/package.json index 1e1eab9142..84f4f56d74 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@next/mdx": "12.0.4", "@oasisdex/addresses": "0.0.42", "@oasisdex/automation": "^1.5.2", - "@oasisdex/dma-library": "0.4.8", + "@oasisdex/dma-library": "0.4.10", "@oasisdex/multiply": "^0.2.11", "@oasisdex/transactions": "0.1.4-alpha.0", "@oasisdex/utils": "^0.0.8", diff --git a/yarn.lock b/yarn.lock index a2cbd91c20..6904a9e206 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3914,10 +3914,10 @@ dependencies: ethers "^5.6.2" -"@oasisdex/dma-library@0.4.8": - version "0.4.8" - resolved "https://registry.yarnpkg.com/@oasisdex/dma-library/-/dma-library-0.4.8.tgz#6f6adab1e87eb4ff51c276fc37517831bbe4c5d7" - integrity sha512-+3olkGx+k8rCldbl95vR1aW5Ag2jOUP+Z3jKQaNhE3Vjp5ffy0XEse0v/lARodwJgLJ4E1ivSV52L0meQSeEUg== +"@oasisdex/dma-library@0.4.10": + version "0.4.10" + resolved "https://registry.yarnpkg.com/@oasisdex/dma-library/-/dma-library-0.4.10.tgz#a15f887df59be8c8489bd3175f22265ee765f3b7" + integrity sha512-6iUlMwGtp1WgtlVNHVHLGUsfj0Hr3ZHyC0o1CnFcNuT3elQda+td2ZbWFvOmFfrA7KvXB9zvxgDtYSRmg9Rtig== dependencies: bignumber.js "9.0.1" ethers "5.6.2"