Skip to content

Commit

Permalink
resolve todo
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Oct 12, 2023
1 parent 0ab97c9 commit f4365bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/components/swapv2/LimitOrder/ActionButtonLimitOrder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ export default function ActionButtonLimitOrder({
onWrapToken: () => Promise<void>
showPreview: () => void
editOrderInfo?: EditOrderInfo
}): any {
// todo any
}) {
const { isEdit, renderCancelButtons } = editOrderInfo || {}
const disableBtnApproved =
approval === ApprovalState.PENDING ||
Expand Down Expand Up @@ -119,7 +118,7 @@ export default function ActionButtonLimitOrder({
)

if (isEdit) {
return checkingAllowance ? <ButtonPrimary disabled>{contentButton}</ButtonPrimary> : renderCancelButtons?.()
return checkingAllowance ? <ButtonPrimary disabled>{contentButton}</ButtonPrimary> : renderCancelButtons?.() || null
}

if (showWarning && !disableBtnReview) return <ButtonWarning onClick={showPreview}>{contentButton}</ButtonWarning>
Expand Down
1 change: 0 additions & 1 deletion src/components/swapv2/LimitOrder/EditOrderModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export default function EditOrderModal({
const isWaiting = cancelStatus === CancelStatus.WAITING
const showReview = isReviewOrder && isWaiting

// todo
const ref = useRef<LimitOrderFormHandle>(null)
const renderCancelButtons = () => {
const hasChangeInfo = step === Steps.EDIT_ORDER ? ref.current?.hasChangedOrderInfo?.() : true
Expand Down

0 comments on commit f4365bc

Please sign in to comment.