From e10a55ad4781b60f436f0abebfc553430fb175c4 Mon Sep 17 00:00:00 2001 From: Danh Date: Tue, 12 Sep 2023 13:35:04 +0700 Subject: [PATCH] chore --- src/components/swapv2/LimitOrder/Modals/CancelOrderModal.tsx | 4 ++-- src/components/swapv2/LimitOrder/useFetchActiveAllOrders.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/swapv2/LimitOrder/Modals/CancelOrderModal.tsx b/src/components/swapv2/LimitOrder/Modals/CancelOrderModal.tsx index a6d544778d..cb2d489cf4 100644 --- a/src/components/swapv2/LimitOrder/Modals/CancelOrderModal.tsx +++ b/src/components/swapv2/LimitOrder/Modals/CancelOrderModal.tsx @@ -6,7 +6,7 @@ import Logo from 'components/Logo' import Modal from 'components/Modal' import CancelButtons from 'components/swapv2/LimitOrder/Modals/CancelButtons' import CancelStatusCountDown from 'components/swapv2/LimitOrder/Modals/CancelStatusCountDown' -import useFetchActiveAllOrders from 'components/swapv2/LimitOrder/useFetchActiveAllOrders' +import useAllActiveOrders from 'components/swapv2/LimitOrder/useFetchActiveAllOrders' import { useCurrencyV2 } from 'hooks/Tokens' import { TransactionFlowState } from 'types/TransactionFlowState' @@ -57,7 +57,7 @@ function ContentCancel({ const [expiredTime, setExpiredTime] = useState(0) const [cancelStatus, setCancelStatus] = useState(CancelStatus.WAITING) - const { orders = [], ordersSoftCancel = [], supportCancelGasless } = useFetchActiveAllOrders(false && !isCancelAll) + const { orders = [], ordersSoftCancel = [], supportCancelGasless } = useAllActiveOrders(false && !isCancelAll) const requestCancel = async (type: CancelOrderType) => { const gasLessCancel = type === CancelOrderType.GAS_LESS_CANCEL const signal = controller.current.signal diff --git a/src/components/swapv2/LimitOrder/useFetchActiveAllOrders.ts b/src/components/swapv2/LimitOrder/useFetchActiveAllOrders.ts index 106a7c2394..44be856dfa 100644 --- a/src/components/swapv2/LimitOrder/useFetchActiveAllOrders.ts +++ b/src/components/swapv2/LimitOrder/useFetchActiveAllOrders.ts @@ -16,7 +16,7 @@ export const useIsSupportSoftCancelOrder = () => { ) } -export default function useFetchActiveAllOrders(disabled = false) { +export default function useAllActiveOrders(disabled = false) { const { account, chainId } = useActiveWeb3React() const { data } = useGetListOrdersQuery( { chainId, maker: account, status: LimitOrderStatus.ACTIVE, pageSize: 100 },