From 51f9af9779782f462e341b8a04f0e3d23512a4e9 Mon Sep 17 00:00:00 2001 From: Piotr Witek <739075+piotrwitek@users.noreply.github.com> Date: Wed, 27 Mar 2024 10:51:11 +0100 Subject: [PATCH] Fixed imports issues --- features/refinance/MakerRefinanceContext.tsx | 2 +- features/refinance/RefinanceContext.tsx | 5 ++--- features/refinance/mapTokenToSdkToken.tsx | 2 +- features/refinance/sdkMappings.ts | 2 +- features/refinance/useSdkSimulation.tsx | 21 ++++++++++---------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/features/refinance/MakerRefinanceContext.tsx b/features/refinance/MakerRefinanceContext.tsx index 44b3f1c106..d0aeacabb9 100644 --- a/features/refinance/MakerRefinanceContext.tsx +++ b/features/refinance/MakerRefinanceContext.tsx @@ -1,4 +1,4 @@ -import { type PositionId } from '@summerfi/sdk-common/dist/common' +import { type PositionId } from '@summerfi/sdk-common' import type { GeneralManageVaultState } from 'features/generalManageVault/generalManageVault.types' import type { PropsWithChildren } from 'react' import React from 'react' diff --git a/features/refinance/RefinanceContext.tsx b/features/refinance/RefinanceContext.tsx index 70249dbbc1..7d560e2c75 100644 --- a/features/refinance/RefinanceContext.tsx +++ b/features/refinance/RefinanceContext.tsx @@ -1,6 +1,5 @@ -import type { AddressValue, ChainInfo, PositionId } from '@summerfi/sdk-common/dist/common' -import { TokenAmount } from '@summerfi/sdk-common/dist/common' -import { getChainInfoByChainId } from '@summerfi/sdk-common/dist/common/implementation/ChainFamilies' +import type { AddressValue, ChainInfo, PositionId } from '@summerfi/sdk-common' +import { getChainInfoByChainId, TokenAmount } from '@summerfi/sdk-common' import type { PropsWithChildren } from 'react' import React from 'react' diff --git a/features/refinance/mapTokenToSdkToken.tsx b/features/refinance/mapTokenToSdkToken.tsx index 5039277b6d..e9b24a30c4 100644 --- a/features/refinance/mapTokenToSdkToken.tsx +++ b/features/refinance/mapTokenToSdkToken.tsx @@ -1,4 +1,4 @@ -import { Address, AddressType,type ChainInfo, Token } from '@summerfi/sdk-common/dist/common' +import { Address, AddressType,type ChainInfo, Token } from '@summerfi/sdk-common' import { getNetworkContracts } from 'blockchain/contracts' import { getTokenMetaData } from 'features/exchange/exchange' diff --git a/features/refinance/sdkMappings.ts b/features/refinance/sdkMappings.ts index bf318d3878..ebea2a31cc 100644 --- a/features/refinance/sdkMappings.ts +++ b/features/refinance/sdkMappings.ts @@ -1,4 +1,4 @@ -import { ProtocolName } from '@summerfi/sdk-common/dist/protocols/enums/ProtocolName' +import { ProtocolName } from '@summerfi/sdk-common' import { LendingProtocol } from 'lendingProtocols' const ProtocolNameByLendingProtocol: Record = { diff --git a/features/refinance/useSdkSimulation.tsx b/features/refinance/useSdkSimulation.tsx index 62b2032fd5..58d5269730 100644 --- a/features/refinance/useSdkSimulation.tsx +++ b/features/refinance/useSdkSimulation.tsx @@ -1,20 +1,22 @@ import { type Chain, makeSDK, PositionUtils, type User } from '@summerfi/sdk-client' +import type { + AddressValue, + IRefinanceParameters, + Position, + Simulation, + SimulationType, +} from '@summerfi/sdk-common' import { Address, AddressType, - type AddressValue, CurrencySymbol, + getChainInfoByChainId, Percentage, - type Position, Price, RiskRatio, RiskRatioType, Wallet, -} from '@summerfi/sdk-common/dist/common' -import { getChainInfoByChainId } from '@summerfi/sdk-common/dist/common/implementation/ChainFamilies' -import type { IRefinanceParameters } from '@summerfi/sdk-common/dist/orders' -import type { SimulationType } from '@summerfi/sdk-common/dist/simulation/Enums' -import type { Simulation } from '@summerfi/sdk-common/dist/simulation/Simulation' +} from '@summerfi/sdk-common' import { useEffect, useState } from 'react' import { type RefinanceContext } from './RefinanceContext' @@ -99,9 +101,8 @@ export function useSdkSimulation(context: RefinanceContext, address: AddressValu } const fetchData = async () => { - const _simulation = await sdk.simulator.refinance.simulateRefinancePosition( - refinanceParameters, - ) + const _simulation = + await sdk.simulator.refinance.simulateRefinancePosition(refinanceParameters) setSimulation(_simulation) } void fetchData().catch((err) => {