From f4365bc79cef860c196674d200291e1576897cdc Mon Sep 17 00:00:00 2001 From: Danh Date: Thu, 12 Oct 2023 11:36:17 +0700 Subject: [PATCH] resolve todo --- src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx | 5 ++--- src/components/swapv2/LimitOrder/EditOrderModal.tsx | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx b/src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx index 1c78494d72..080cf51828 100644 --- a/src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx +++ b/src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx @@ -54,8 +54,7 @@ export default function ActionButtonLimitOrder({ onWrapToken: () => Promise showPreview: () => void editOrderInfo?: EditOrderInfo -}): any { - // todo any +}) { const { isEdit, renderCancelButtons } = editOrderInfo || {} const disableBtnApproved = approval === ApprovalState.PENDING || @@ -119,7 +118,7 @@ export default function ActionButtonLimitOrder({ ) if (isEdit) { - return checkingAllowance ? {contentButton} : renderCancelButtons?.() + return checkingAllowance ? {contentButton} : renderCancelButtons?.() || null } if (showWarning && !disableBtnReview) return {contentButton} diff --git a/src/components/swapv2/LimitOrder/EditOrderModal.tsx b/src/components/swapv2/LimitOrder/EditOrderModal.tsx index 33a01ff325..95c5e2bb5e 100644 --- a/src/components/swapv2/LimitOrder/EditOrderModal.tsx +++ b/src/components/swapv2/LimitOrder/EditOrderModal.tsx @@ -112,7 +112,6 @@ export default function EditOrderModal({ const isWaiting = cancelStatus === CancelStatus.WAITING const showReview = isReviewOrder && isWaiting - // todo const ref = useRef(null) const renderCancelButtons = () => { const hasChangeInfo = step === Steps.EDIT_ORDER ? ref.current?.hasChangedOrderInfo?.() : true