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