From 5c6135c9eeeba636f965f3a3014cd93a6aae9522 Mon Sep 17 00:00:00 2001 From: Marcin Ciarka Date: Tue, 2 Apr 2024 17:22:25 +0200 Subject: [PATCH] Update resolvedId to openFlowResolvedDpmId --- features/omni-kit/contexts/OmniProductContext.tsx | 2 +- .../getOmniAutomationSidebarPrimaryButtonActions.ts | 6 +++--- .../helpers/getOmniSidebarPrimaryButtonActions.ts | 6 +++--- features/omni-kit/types.ts | 2 +- features/omni-kit/views/OmniAutomationFormView.tsx | 4 ++-- features/omni-kit/views/OmniFormView.tsx | 10 +++++----- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/features/omni-kit/contexts/OmniProductContext.tsx b/features/omni-kit/contexts/OmniProductContext.tsx index e9dbb30c13..7722a10a74 100644 --- a/features/omni-kit/contexts/OmniProductContext.tsx +++ b/features/omni-kit/contexts/OmniProductContext.tsx @@ -165,7 +165,7 @@ export function OmniProductContextProvider({ simulation: simulation?.position, }, isSimulationLoading, - resolvedId: positionIdFromDpmProxyData, + openFlowResolvedDpmId: positionIdFromDpmProxyData, positionAuction, swap: { current: formatSwapData({ diff --git a/features/omni-kit/helpers/getOmniAutomationSidebarPrimaryButtonActions.ts b/features/omni-kit/helpers/getOmniAutomationSidebarPrimaryButtonActions.ts index 0fcf5b144f..bd2da19287 100644 --- a/features/omni-kit/helpers/getOmniAutomationSidebarPrimaryButtonActions.ts +++ b/features/omni-kit/helpers/getOmniAutomationSidebarPrimaryButtonActions.ts @@ -24,7 +24,7 @@ interface GetOmniAutomationSidebarPrimaryButtonActionsParams { pseudoProtocol?: string quoteAddress: string quoteToken: string - resolvedId?: string + openFlowResolvedDpmId?: string shouldSwitchNetwork: boolean walletAddress?: string } @@ -50,7 +50,7 @@ export function getOmniAutomationSidebarPrimaryButtonActions({ pseudoProtocol, quoteAddress, quoteToken, - resolvedId, + openFlowResolvedDpmId, shouldSwitchNetwork, walletAddress, }: GetOmniAutomationSidebarPrimaryButtonActionsParams) { @@ -67,7 +67,7 @@ export function getOmniAutomationSidebarPrimaryButtonActions({ isPoolOracless: isOracless, label, networkName: network.name, - positionId: resolvedId, + positionId: openFlowResolvedDpmId, productType, protocol, pseudoProtocol, diff --git a/features/omni-kit/helpers/getOmniSidebarPrimaryButtonActions.ts b/features/omni-kit/helpers/getOmniSidebarPrimaryButtonActions.ts index 5ea84f184c..f51a34cd03 100644 --- a/features/omni-kit/helpers/getOmniSidebarPrimaryButtonActions.ts +++ b/features/omni-kit/helpers/getOmniSidebarPrimaryButtonActions.ts @@ -28,7 +28,7 @@ interface GetOmniSidebarPrimaryButtonActionsParams { pseudoProtocol?: string quoteAddress: string quoteToken: string - resolvedId?: string + openFlowResolvedDpmId?: string shouldSwitchNetwork: boolean walletAddress?: string } @@ -58,7 +58,7 @@ export function getOmniSidebarPrimaryButtonActions({ pseudoProtocol, quoteAddress, quoteToken, - resolvedId, + openFlowResolvedDpmId, shouldSwitchNetwork, walletAddress, }: GetOmniSidebarPrimaryButtonActionsParams) { @@ -75,7 +75,7 @@ export function getOmniSidebarPrimaryButtonActions({ isPoolOracless: isOracless, label, networkName: network.name, - positionId: resolvedId, + positionId: openFlowResolvedDpmId, productType, protocol, pseudoProtocol, diff --git a/features/omni-kit/types.ts b/features/omni-kit/types.ts index aac53d2f7e..c6d7f24283 100644 --- a/features/omni-kit/types.ts +++ b/features/omni-kit/types.ts @@ -524,7 +524,7 @@ interface ProductContextPosition { cached?: OmniSimulationSwap } isSimulationLoading?: boolean - resolvedId?: string + openFlowResolvedDpmId?: string setCachedPosition: (positionSet: OmniPositionSet) => void setIsLoadingSimulation: Dispatch> setSimulation: Dispatch | undefined>> diff --git a/features/omni-kit/views/OmniAutomationFormView.tsx b/features/omni-kit/views/OmniAutomationFormView.tsx index a843b10a71..3d55308874 100644 --- a/features/omni-kit/views/OmniAutomationFormView.tsx +++ b/features/omni-kit/views/OmniAutomationFormView.tsx @@ -68,7 +68,7 @@ export function OmniAutomationFormView({ setSimulation, setCachedOrderInfoItems, }, - position: { resolvedId }, + position: { openFlowResolvedDpmId }, dynamicMetadata: { featureToggles: { suppressValidation, safetySwitch }, validations: { isFormFrozen }, @@ -147,7 +147,7 @@ export function OmniAutomationFormView({ quoteAddress, quoteToken, shouldSwitchNetwork, - resolvedId, + openFlowResolvedDpmId, walletAddress, }) const textButtonAction = () => { diff --git a/features/omni-kit/views/OmniFormView.tsx b/features/omni-kit/views/OmniFormView.tsx index 82e7dda710..423392eb73 100644 --- a/features/omni-kit/views/OmniFormView.tsx +++ b/features/omni-kit/views/OmniFormView.tsx @@ -87,7 +87,7 @@ export function OmniFormView({ } = useOmniGeneralContext() const { form: { dispatch, state }, - position: { isSimulationLoading, resolvedId }, + position: { isSimulationLoading, openFlowResolvedDpmId }, dynamicMetadata: { elements: { sidebarContent }, featureToggles: { suppressValidation, safetySwitch }, @@ -158,7 +158,7 @@ export function OmniFormView({ transitionHandler, } = useOmniProductTypeTransition({ action: state.action, - positionId: positionId || resolvedId, + positionId: positionId || openFlowResolvedDpmId, protocol, productType, tokenPair: `${collateralToken}-${quoteToken}`, @@ -235,7 +235,7 @@ export function OmniFormView({ quoteAddress, quoteToken, shouldSwitchNetwork, - resolvedId, + openFlowResolvedDpmId, walletAddress, }) const textButtonAction = () => { @@ -263,9 +263,9 @@ export function OmniFormView({ {sidebarContent} {children} - {OmniKitDebug && resolvedId && ( + {OmniKitDebug && openFlowResolvedDpmId && ( - +