From ea202aaf269eddb2169fba64e63059a620a895f3 Mon Sep 17 00:00:00 2001 From: Danh Date: Tue, 12 Sep 2023 09:53:20 +0700 Subject: [PATCH] fix: disable cancel f --- src/components/swapv2/LimitOrder/ListOrder/index.tsx | 3 ++- .../swapv2/LimitOrder/Modals/CancelStatusCountDown.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/swapv2/LimitOrder/ListOrder/index.tsx b/src/components/swapv2/LimitOrder/ListOrder/index.tsx index 00894a3732..a04a0889ca 100644 --- a/src/components/swapv2/LimitOrder/ListOrder/index.tsx +++ b/src/components/swapv2/LimitOrder/ListOrder/index.tsx @@ -267,12 +267,13 @@ export default forwardRef(function ListLimitOrder(props, ref) { const showEditOrderModal = useCallback( (order: LimitOrder) => { + setFlowState({ ...TRANSACTION_STATE_DEFAULT }) setCurrentOrder(order) setIsOpenEdit(true) setIsCancelAll(false) mixpanelHandler(MIXPANEL_TYPE.LO_CLICK_EDIT_ORDER, getPayloadTracking(order, networkInfo.name)) }, - [mixpanelHandler, networkInfo.name], + [mixpanelHandler, networkInfo.name, setFlowState], ) const totalOrderNotCancelling = useMemo(() => { diff --git a/src/components/swapv2/LimitOrder/Modals/CancelStatusCountDown.tsx b/src/components/swapv2/LimitOrder/Modals/CancelStatusCountDown.tsx index e9e932e289..b4a551b777 100644 --- a/src/components/swapv2/LimitOrder/Modals/CancelStatusCountDown.tsx +++ b/src/components/swapv2/LimitOrder/Modals/CancelStatusCountDown.tsx @@ -90,7 +90,7 @@ export default function CancelStatusCountDown({ if (errorMessage || attemptingTxn) return ( - + {errorMessage ? ( <>