From 04a8399c36195e3b14d1443ae620f04f098217a0 Mon Sep 17 00:00:00 2001 From: Javier Bueno Date: Thu, 19 Oct 2023 14:24:34 +0200 Subject: [PATCH] fix(swap): limit input --- .../src/features/Swap/common/SwapFormProvider.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/wallet-mobile/src/features/Swap/common/SwapFormProvider.tsx b/apps/wallet-mobile/src/features/Swap/common/SwapFormProvider.tsx index 96e92c730f..286f351050 100644 --- a/apps/wallet-mobile/src/features/Swap/common/SwapFormProvider.tsx +++ b/apps/wallet-mobile/src/features/Swap/common/SwapFormProvider.tsx @@ -153,7 +153,7 @@ export const SwapFormProvider = ({ actions.limitPriceInputValueChanged( Quantities.format(orderData.limitPrice ?? Quantities.zero, denomination, PRECISION), ) - } else { + } else if (orderData.type === 'market') { actions.limitPriceInputValueChanged( Quantities.format(orderData.selectedPoolCalculation?.prices.market ?? Quantities.zero, denomination, PRECISION), ) @@ -277,6 +277,7 @@ const swapFormReducer = (state: SwapFormState, action: SwapFormAction) => { break case SwapFormActionType.LimitPriceInputValueChanged: + console.log(SwapFormActionType.LimitPriceInputValueChanged, action.value) draft.limitPrice.displayValue = action.value break