From edb58e92a6bfdf113ac2d3b6d99c3ebaa22d4c46 Mon Sep 17 00:00:00 2001 From: Sukh Singh Date: Tue, 3 Dec 2024 17:04:56 +0000 Subject: [PATCH] fix lint errors --- src/trade/twap/orders/orders.tsx | 8 ++++---- src/trade/twap/orders/use-orders-query.ts | 2 +- tsconfig.app.tsbuildinfo | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/trade/twap/orders/orders.tsx b/src/trade/twap/orders/orders.tsx index f348324..2f0f328 100644 --- a/src/trade/twap/orders/orders.tsx +++ b/src/trade/twap/orders/orders.tsx @@ -147,10 +147,10 @@ const useCancelOrder = () => { mutationFn: async (orderID: number) => { twapSDK.analytics.onCancelOrderRequest(orderID); - const hash = await (writeContractAsync as any)({ + const hash = await (writeContractAsync)({ abi: TwapAbi, functionName: "cancel", - address: twapSDK.config.twapAddress as any, + address: twapSDK.config.twapAddress, account, args: [orderID], }); @@ -377,7 +377,7 @@ export const SelectedOrderDetails = ({ const executionPrice = useMemo(() => { if (!inToken || !outToken) return; return order.getExcecutionPrice(inToken.decimals, outToken.decimals); - }, [inToken, outToken]); + }, [inToken, order, outToken]); const limitPrice = useMemo(() => { if (!inToken || !outToken) return; @@ -386,7 +386,7 @@ export const SelectedOrderDetails = ({ return `1 ${inToken.symbol} = ${format.crypto(Number(price))} ${ outToken.symbol }`; - }, [inToken, outToken]); + }, [inToken, order, outToken]); return ( diff --git a/src/trade/twap/orders/use-orders-query.ts b/src/trade/twap/orders/use-orders-query.ts index f2adc9c..8fccfcf 100644 --- a/src/trade/twap/orders/use-orders-query.ts +++ b/src/trade/twap/orders/use-orders-query.ts @@ -19,7 +19,7 @@ export function useOrdersQuery() { return useQuery({ queryKey, queryFn: async ({ signal }) => { - const orders = await twapSDK.getOrders(address!, signal); + const orders = await twapSDK.getUserOrders({ account: address!, signal }); return orders; }, diff --git a/tsconfig.app.tsbuildinfo b/tsconfig.app.tsbuildinfo index e55ee4a..5cbf85f 100644 --- a/tsconfig.app.tsbuildinfo +++ b/tsconfig.app.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/app.tsx","./src/main.tsx","./src/root.tsx","./src/store.ts","./src/types.ts","./src/vite-env.d.ts","./src/components/header.tsx","./src/components/order-details.tsx","./src/components/spinner.tsx","./src/components/theme-toggle.tsx","./src/components/tokens/token-card.tsx","./src/components/tokens/token-select.tsx","./src/components/ui/avatar.tsx","./src/components/ui/button.tsx","./src/components/ui/card.tsx","./src/components/ui/data-details.tsx","./src/components/ui/dialog.tsx","./src/components/ui/dropdown-menu.tsx","./src/components/ui/input.tsx","./src/components/ui/label.tsx","./src/components/ui/popover.tsx","./src/components/ui/separator.tsx","./src/components/ui/skeleton.tsx","./src/components/ui/sonner.tsx","./src/components/ui/switch-button.tsx","./src/components/ui/switch.tsx","./src/components/ui/tabs.tsx","./src/components/ui/tooltip.tsx","./src/lib/abis.ts","./src/lib/getrequiresapproval.ts","./src/lib/index.ts","./src/lib/networks.ts","./src/lib/useapproveallowance.ts","./src/lib/usedebounce.ts","./src/lib/usedefaulttokens.ts","./src/lib/usegetrequiresapproval.ts","./src/lib/usehandleinputerror.ts","./src/lib/useparaswap.ts","./src/lib/usepriceusd.ts","./src/lib/usetokens.ts","./src/lib/usewraporunwraponly.ts","./src/lib/usewraptoken.ts","./src/lib/utils.ts","./src/lib/wagmi-config.ts","./src/lib/tokens/base.ts","./src/lib/tokens/index.ts","./src/providers/rainbow-provider.tsx","./src/providers/theme-provider.tsx","./src/trade/hooks.ts","./src/trade/settings.tsx","./src/trade/swap-confirmation-dialog.tsx","./src/trade/liquidity-hub/consts.ts","./src/trade/liquidity-hub/context.tsx","./src/trade/liquidity-hub/hooks.ts","./src/trade/liquidity-hub/liquidity-hub-confirmation-dialog.tsx","./src/trade/liquidity-hub/liquidity-hub-swap.tsx","./src/trade/liquidity-hub/swap-details.tsx","./src/trade/liquidity-hub/useisliquidityhubtrade.ts","./src/trade/liquidity-hub/useliquidityhubquote.ts","./src/trade/liquidity-hub/useliquidityhubswapcallback.ts","./src/trade/liquidity-hub/useparaswapswapcallback.ts","./src/trade/twap/context.tsx","./src/trade/twap/hooks.ts","./src/trade/twap/twap-confirmation-dialog.tsx","./src/trade/twap/twap.tsx","./src/trade/twap/usesubmitordercallback.ts","./src/trade/twap/utils.ts","./src/trade/twap/components/inputs.tsx","./src/trade/twap/components/limit-price-input.tsx","./src/trade/twap/components/price-toggle.tsx","./src/trade/twap/components/src-chunk-size.tsx","./src/trade/twap/orders/orders-context.tsx","./src/trade/twap/orders/orders.tsx","./src/trade/twap/orders/use-orders-query.ts"],"version":"5.6.2"} \ No newline at end of file +{"root":["./src/app.tsx","./src/main.tsx","./src/root.tsx","./src/store.ts","./src/types.ts","./src/vite-env.d.ts","./src/components/header.tsx","./src/components/order-details.tsx","./src/components/spinner.tsx","./src/components/theme-toggle.tsx","./src/components/tokens/token-card.tsx","./src/components/tokens/token-select.tsx","./src/components/ui/avatar.tsx","./src/components/ui/button.tsx","./src/components/ui/card.tsx","./src/components/ui/data-details.tsx","./src/components/ui/dialog.tsx","./src/components/ui/dropdown-menu.tsx","./src/components/ui/input.tsx","./src/components/ui/label.tsx","./src/components/ui/popover.tsx","./src/components/ui/separator.tsx","./src/components/ui/skeleton.tsx","./src/components/ui/sonner.tsx","./src/components/ui/switch-button.tsx","./src/components/ui/switch.tsx","./src/components/ui/tabs.tsx","./src/components/ui/tooltip.tsx","./src/lib/abis.ts","./src/lib/getrequiresapproval.ts","./src/lib/index.ts","./src/lib/networks.ts","./src/lib/useapproveallowance.ts","./src/lib/usedebounce.ts","./src/lib/usedefaulttokens.ts","./src/lib/usegetrequiresapproval.ts","./src/lib/usehandleinputerror.ts","./src/lib/useparaswap.ts","./src/lib/usepriceusd.ts","./src/lib/usetokens.ts","./src/lib/usewraporunwraponly.ts","./src/lib/usewraptoken.ts","./src/lib/utils.ts","./src/lib/wagmi-config.ts","./src/lib/tokens/base.ts","./src/lib/tokens/index.ts","./src/providers/rainbow-provider.tsx","./src/providers/theme-provider.tsx","./src/trade/hooks.ts","./src/trade/settings.tsx","./src/trade/swap-confirmation-dialog.tsx","./src/trade/liquidity-hub/consts.ts","./src/trade/liquidity-hub/context.tsx","./src/trade/liquidity-hub/hooks.ts","./src/trade/liquidity-hub/liquidity-hub-confirmation-dialog.tsx","./src/trade/liquidity-hub/liquidity-hub-swap.tsx","./src/trade/liquidity-hub/swap-details.tsx","./src/trade/liquidity-hub/useisliquidityhubtrade.ts","./src/trade/liquidity-hub/useliquidityhubquote.ts","./src/trade/liquidity-hub/useliquidityhubswapcallback.ts","./src/trade/liquidity-hub/useparaswapswapcallback.ts","./src/trade/twap/context.tsx","./src/trade/twap/hooks.ts","./src/trade/twap/twap-confirmation-dialog.tsx","./src/trade/twap/twap.tsx","./src/trade/twap/usesubmitordercallback.ts","./src/trade/twap/utils.ts","./src/trade/twap/components/inputs.tsx","./src/trade/twap/components/limit-price-input.tsx","./src/trade/twap/components/price-toggle.tsx","./src/trade/twap/components/src-chunk-size.tsx","./src/trade/twap/orders/orders-context.tsx","./src/trade/twap/orders/orders.tsx","./src/trade/twap/orders/use-orders-query.ts"],"errors":true,"version":"5.6.2"} \ No newline at end of file