}
diff --git a/src/trade/twap/components/price-toggle.tsx b/src/trade/twap/components/price-toggle.tsx
index 6fdb938..317ab42 100644
--- a/src/trade/twap/components/price-toggle.tsx
+++ b/src/trade/twap/components/price-toggle.tsx
@@ -6,11 +6,14 @@ export function PriceToggle() {
const {
isMarketOrder,
state: { updateState },
+ isLimitPanel
} = useTwapContext();
const onMarketOrderChange = useCallback((isMarketOrder: boolean) => {
updateState({ isMarketOrder });
}, []);
+
+ if(isLimitPanel) return null;
return (
diff --git a/src/trade/twap/context.tsx b/src/trade/twap/context.tsx
index a73686f..29a52ed 100644
--- a/src/trade/twap/context.tsx
+++ b/src/trade/twap/context.tsx
@@ -16,6 +16,7 @@ import {
useReducer,
useState,
} from "react";
+import { useAccount } from "wagmi";
import { useToRawAmount } from "../hooks";
interface Context {
@@ -59,8 +60,7 @@ type TwapState = {
isTradePriceInverted?: boolean;
};
-const initialState = {typedAmount: ''} as TwapState;
-
+const initialState = { typedAmount: "" } as TwapState;
const useTwapState = () => {
const [_values, dispatch] = useReducer(
(state: TwapState, action: Action) =>
@@ -70,15 +70,13 @@ const useTwapState = () => {
const defaultTokens = useDefaultTokens();
-
const values = useMemo(() => {
return {
..._values,
inToken: _values.inToken || defaultTokens?.inToken || null,
outToken: _values.outToken || defaultTokens?.outToken || null,
- }
- }, [_values, defaultTokens?.inToken, defaultTokens?.outToken])
-
+ };
+ }, [_values, defaultTokens?.inToken, defaultTokens?.outToken]);
const updateState = useCallback(
(payload: Partial) => {
@@ -98,6 +96,16 @@ const useTwapState = () => {
};
};
+const useConfig = () => {
+ const chainId = useAccount().chainId;
+ return useMemo(
+ () =>
+ Object.values(Configs).find((it: any) => it.chainId === chainId) ||
+ Configs.QuickSwap,
+ [chainId]
+ );
+};
+
export const TwapContextProvider = ({
children,
isLimitPanel = false,
@@ -106,11 +114,18 @@ export const TwapContextProvider = ({
isLimitPanel?: boolean;
}) => {
const state = useTwapState();
+ const chainId = useAccount()?.chainId;
+
const [currentTime, setCurrentTime] = useState(Date.now());
- const twapSDK = useMemo(
- () => constructSDK({ config: Configs.QuickSwap }),
- []
- );
+ const config = useConfig();
+
+ const twapSDK = useMemo(() => constructSDK({ config }), [config]);
+
+ useEffect(() => {
+ if (chainId) {
+ state.resetState();
+ }
+ }, [chainId]);
useEffect(() => {
setInterval(() => {
diff --git a/src/trade/twap/hooks.ts b/src/trade/twap/hooks.ts
index d012b23..8af51f6 100644
--- a/src/trade/twap/hooks.ts
+++ b/src/trade/twap/hooks.ts
@@ -1,4 +1,6 @@
import {
+ networks,
+ toExactAmount,
toRawAmount,
useInputError,
useParaswapQuote,
@@ -13,6 +15,7 @@ import {
MIN_DURATION_MINUTES,
MIN_FILL_DELAY_MINUTES,
} from "@orbs-network/twap-sdk";
+import { useAccount } from "wagmi";
export const useDerivedTwapSwapData = () => {
const {
@@ -27,9 +30,7 @@ export const useDerivedTwapSwapData = () => {
state.values;
const price = useTradePrice();
- const { data: oneSrcTokenUsd } = usePriceUsd(
- inToken?.address
- );
+ const { data: oneSrcTokenUsd } = usePriceUsd(inToken?.address);
const swapValues = twapSDK.derivedSwapValues({
srcAmount: parsedInputAmount,
@@ -63,7 +64,17 @@ export const useOptimalRate = () => {
};
export const useMarketPrice = () => {
- return useOptimalRate().data?.destAmount;
+ const chainId = useAccount().chainId;
+ const {
+ state: {
+ values: { outToken },
+ },
+ } = useTwapContext();
+ const rate = useOptimalRate().data?.destAmount;
+ if (chainId === networks.sei.id) {
+ return toExactAmount("1", outToken?.decimals);
+ }
+ return rate;
};
export const useTradePrice = () => {
@@ -137,9 +148,9 @@ const useTradeSizeWarning = () => {
const { warnings } = useDerivedTwapSwapData();
const { twapSDK } = useTwapContext();
return useMemo(() => {
- if (warnings.tradeSize) {
- return `Trade size must be at least ${twapSDK.config.minChunkSizeUsd}`;
- }
+ // if (warnings.tradeSize) {
+ // return `Trade size must be at least Z${twapSDK.config.minChunkSizeUsd}`;
+ // }
}, [warnings.tradeSize, twapSDK.config.minChunkSizeUsd]);
};
diff --git a/src/trade/twap/orders/orders.tsx b/src/trade/twap/orders/orders.tsx
index fb24845..f348324 100644
--- a/src/trade/twap/orders/orders.tsx
+++ b/src/trade/twap/orders/orders.tsx
@@ -35,11 +35,9 @@ import moment from "moment";
import { useMutation } from "@tanstack/react-query";
import { useTwapContext } from "../context";
import {
- writeContract,
- simulateContract,
- getTransactionReceipt,
+ waitForTransactionReceipt,
} from "wagmi/actions";
-import { useAccount } from "wagmi";
+import { useAccount, useWriteContract } from "wagmi";
export function Orders() {
return (
@@ -118,7 +116,7 @@ const OrdersMenu = () => {
};
const useToken = (tokenAddress?: string) => {
- const tokens = useSortedTokens()
+ const tokens = useSortedTokens();
return useMemo(
() => tokens?.find((it) => eqIgnoreCase(it.address, tokenAddress || "")),
@@ -143,38 +141,44 @@ const getOrderTitle = (order: Order) => {
const useCancelOrder = () => {
const { twapSDK } = useTwapContext();
const { refetch } = useOrdersQuery();
- const {address: account} = useAccount()
+ const { address: account } = useAccount();
+ const { writeContractAsync } = useWriteContract();
return useMutation({
mutationFn: async (orderID: number) => {
twapSDK.analytics.onCancelOrderRequest(orderID);
- const simulatedData = await simulateContract(wagmiConfig, {
+
+ const hash = await (writeContractAsync as any)({
abi: TwapAbi,
functionName: "cancel",
address: twapSDK.config.twapAddress as any,
account,
args: [orderID],
});
-
- const hash = await writeContract(wagmiConfig, simulatedData.request);
await waitForConfirmations(hash, 1, 20);
- await getTransactionReceipt(wagmiConfig, {
+ await waitForTransactionReceipt(wagmiConfig, {
hash,
});
twapSDK.analytics.onCancelOrderSuccess();
await refetch();
},
onError: (error) => {
-
twapSDK.analytics.onCancelOrderError(error);
},
});
};
-
const CancelOrderButton = ({ order }: { order: Order }) => {
- const {isPending, mutate} =useCancelOrder();
- return
-}
+ const { isPending, mutate } = useCancelOrder();
+ return (
+
+ );
+};
const SelectedOrder = () => {
const { data } = useOrdersQuery();
diff --git a/src/trade/twap/orders/use-orders-query.ts b/src/trade/twap/orders/use-orders-query.ts
index 217feb2..f2adc9c 100644
--- a/src/trade/twap/orders/use-orders-query.ts
+++ b/src/trade/twap/orders/use-orders-query.ts
@@ -20,6 +20,7 @@ export function useOrdersQuery() {
queryKey,
queryFn: async ({ signal }) => {
const orders = await twapSDK.getOrders(address!, signal);
+
return orders;
},
enabled: !!address,
diff --git a/src/trade/twap/twap-confirmation-dialog.tsx b/src/trade/twap/twap-confirmation-dialog.tsx
index 4e01516..b9562c8 100644
--- a/src/trade/twap/twap-confirmation-dialog.tsx
+++ b/src/trade/twap/twap-confirmation-dialog.tsx
@@ -3,7 +3,6 @@ import { SwapSteps } from "@/types";
import { useCallback, useMemo } from "react";
import {
SwapConfirmationDialog,
- SwapProgressState,
useSwapProgress,
} from "../swap-confirmation-dialog";
import {
@@ -15,28 +14,10 @@ import {
import { useTwapContext } from "./context";
import { format, useGetRequiresApproval } from "@/lib";
import { OrderDetails } from "@/components/order-details";
-import { useNetwork, useToExactAmount } from "../hooks";
-import { useAccount } from "wagmi";
+import { useToExactAmount } from "../hooks";
import { SwapStatus } from "@orbs-network/swap-ui";
-import { Address, hexToNumber } from "viem";
-import {
- getSteps,
- isNativeAddress,
- isTxRejected,
- wagmiConfig,
- waitForConfirmations,
-} from "@/lib";
-import { approveAllowance } from "@/lib/approveAllowance";
-import { wrapToken } from "@/lib/wrapToken";
-import { TwapAbi, zeroAddress } from "@orbs-network/twap-sdk";
-import { useMutation } from "@tanstack/react-query";
-import { toast } from "sonner";
-import {
- getTransactionReceipt,
- simulateContract,
- writeContract,
-} from "wagmi/actions";
-import { useWaitForNewOrderCallback } from "./orders/use-orders-query";
+import { Address } from "viem";
+import { useSubmitOrderCallback } from "./useSubmitOrderCallback";
export function TwapConfirmationDialog({
isOpen,
@@ -60,7 +41,7 @@ export function TwapConfirmationDialog({
inToken?.address,
parsedInputAmount
);
- const { mutate: onCreateOrder } = useCreateOrder(
+ const { mutate: onCreateOrder } = useSubmitOrderCallback(
updateState,
requiresApproval
);
@@ -199,154 +180,3 @@ const TradePrice = () => {
);
};
-
-const useWrapCallback = () => {
- const { twapSDK } = useTwapContext();
-
- return useCallback(
- async (account: string, inAmount: string) => {
- try {
- twapSDK.analytics.onWrapRequest();
- await wrapToken(account, inAmount);
- twapSDK.analytics.onWrapSuccess();
- } catch (error) {
- twapSDK.analytics.onWrapError(error);
- throw error;
- }
- },
- [twapSDK]
- );
-};
-
-const useApproveCallback = () => {
- const { twapSDK } = useTwapContext();
- const wToken = useNetwork()?.wToken.address;
- return useCallback(
- async (account: string, inTokenAddress: string) => {
- try {
- twapSDK.analytics.onApproveRequest();
-
- const tokenAddress = isNativeAddress(inTokenAddress)
- ? wToken
- : inTokenAddress;
-
- if (!tokenAddress) {
- throw new Error("Token address not found");
- }
-
- await approveAllowance(
- account,
- tokenAddress,
- twapSDK.config.twapAddress as Address
- );
- twapSDK.analytics.onApproveSuccess();
- } catch (error) {
- twapSDK.analytics.onApproveError(error);
- throw error;
- }
- },
- [twapSDK]
- );
-};
-
-function useCreateOrder(
- updateState: (state: Partial) => void,
- requiresApproval: boolean
-) {
- const {
- twapSDK,
- parsedInputAmount,
- state: {
- values: { inToken, outToken },
- },
- } = useTwapContext();
- const derivedValues = useDerivedTwapSwapData();
- const { address: account } = useAccount();
- const { mutateAsync: waitForNewOrder } = useWaitForNewOrderCallback();
- const wrapTokenCallback = useWrapCallback();
- const approveAllowanceCallback = useApproveCallback();
- const wToken = useNetwork()?.wToken.address;
- return useMutation({
- mutationFn: async () => {
- try {
- const srcTokenAddress = isNativeAddress(inToken?.address)
- ? wToken
- : inToken?.address;
- if (
- !inToken ||
- !account ||
- !parsedInputAmount ||
- !outToken ||
- !srcTokenAddress
- ) {
- throw new Error("Missing required dependencies");
- }
-
- updateState({ swapStatus: SwapStatus.LOADING });
-
- const steps = getSteps({
- inTokenAddress: inToken.address,
- requiresApproval,
- });
- updateState({ steps });
-
- if (steps.includes(SwapSteps.Wrap)) {
- updateState({ currentStep: SwapSteps.Wrap });
- await wrapTokenCallback(account, parsedInputAmount);
- // wrap
- }
-
- if (steps.includes(SwapSteps.Approve)) {
- updateState({ currentStep: SwapSteps.Approve });
- await approveAllowanceCallback(account, inToken.address);
- }
-
- updateState({ currentStep: SwapSteps.Swap });
- const askParams = twapSDK
- .prepareOrderArgs({
- fillDelay: derivedValues.fillDelay,
- deadline: derivedValues.deadline,
- srcAmount: parsedInputAmount ?? "0",
- destTokenMinAmount: derivedValues.destTokenMinAmount,
- srcChunkAmount: derivedValues.srcChunkAmount,
- srcTokenAddress,
- destTokenAddress: isNativeAddress(outToken?.address)
- ? zeroAddress
- : outToken.address,
- })
- .map((it) => it.toString());
-
- twapSDK.analytics.onCreateOrderRequest(askParams, account);
- const simulatedData = await simulateContract(wagmiConfig, {
- abi: TwapAbi,
- functionName: "ask",
- account: account as Address,
- address: twapSDK.config.twapAddress as Address,
- args: [askParams],
- });
-
- const hash = await writeContract(wagmiConfig, simulatedData.request);
- await waitForConfirmations(hash, 1, 20);
- const receipt = await getTransactionReceipt(wagmiConfig, {
- hash,
- });
-
- const orderID = hexToNumber(receipt.logs[0].topics[1]!);
-
- await waitForNewOrder(orderID);
- twapSDK.analytics.onCreateOrderSuccess(hash);
- toast.success("Order created successfully!");
- updateState({ swapStatus: SwapStatus.SUCCESS });
-
- return receipt;
- } catch (error) {
- if (isTxRejected(error)) {
- updateState({ swapStatus: undefined });
- } else {
- twapSDK.analytics.onCreateOrderError(error);
- updateState({ swapStatus: SwapStatus.FAILED });
- }
- }
- },
- });
-}
diff --git a/src/trade/twap/useSubmitOrderCallback.ts b/src/trade/twap/useSubmitOrderCallback.ts
new file mode 100644
index 0000000..faded8b
--- /dev/null
+++ b/src/trade/twap/useSubmitOrderCallback.ts
@@ -0,0 +1,178 @@
+import {
+ waitForConfirmations,
+ wagmiConfig,
+ useWrapToken,
+ useApproveAllowance,
+ isNativeAddress,
+ getSteps,
+ isTxRejected,
+} from "@/lib";
+import { SwapSteps } from "@/types";
+import { SwapStatus } from "@orbs-network/swap-ui";
+import { TwapAbi } from "@orbs-network/twap-sdk";
+import { useMutation } from "@tanstack/react-query";
+import { toast } from "sonner";
+import { hexToNumber, zeroAddress } from "viem";
+import { useWriteContract, useAccount } from "wagmi";
+import { waitForTransactionReceipt } from "wagmi/actions";
+import { useNetwork } from "../hooks";
+import { SwapProgressState } from "../swap-confirmation-dialog";
+import { useTwapContext } from "./context";
+import { useDerivedTwapSwapData } from "./hooks";
+import { useWaitForNewOrderCallback } from "./orders/use-orders-query";
+
+const useCreateOrder = () => {
+ const { writeContractAsync } = useWriteContract();
+ const derivedValues = useDerivedTwapSwapData();
+ const { twapSDK, parsedInputAmount } = useTwapContext();
+ const { mutateAsync: waitForNewOrder } = useWaitForNewOrderCallback();
+ const { address: account } = useAccount();
+
+ return useMutation({
+ mutationFn: async ({
+ srcTokenAddress,
+ destTokenAddress,
+ }: {
+ srcTokenAddress: string;
+ destTokenAddress: string;
+ }) => {
+ const askParams = twapSDK
+ .prepareOrderArgs({
+ fillDelay: derivedValues.fillDelay,
+ deadline: 1733401003000,
+ srcAmount: parsedInputAmount ?? "0",
+ destTokenMinAmount: derivedValues.destTokenMinAmount,
+ srcChunkAmount: derivedValues.srcChunkAmount,
+ srcTokenAddress,
+ destTokenAddress,
+ })
+ .map((it) => it.toString());
+
+ twapSDK.analytics.onCreateOrderRequest(askParams, account);
+
+ const txHash = await (writeContractAsync as any)({
+ abi: TwapAbi,
+ functionName: "ask",
+ account: account,
+ address: twapSDK.config.twapAddress,
+ args: [askParams],
+ });
+ let receipt: any;
+
+ try {
+ await waitForConfirmations(txHash, 1, 20);
+ receipt = await waitForTransactionReceipt(wagmiConfig as any, {
+ hash: txHash,
+ });
+ } catch (error) {
+ console.log({ error });
+ }
+
+ const orderID = hexToNumber(receipt.logs[0].topics[1]!);
+
+ await waitForNewOrder(orderID);
+ twapSDK.analytics.onCreateOrderSuccess(txHash);
+ return {
+ orderID,
+ txHash,
+ };
+ },
+ onError: (error) => {
+ twapSDK.analytics.onCreateOrderError(error);
+ console.error(error);
+ throw error;
+ },
+ });
+};
+
+export function useSubmitOrderCallback(
+ updateState: (state: Partial) => void,
+ requiresApproval: boolean
+) {
+ const {
+ twapSDK,
+ parsedInputAmount,
+ state: {
+ values: { inToken, outToken },
+ },
+ } = useTwapContext();
+ const { mutateAsync: wrap } = useWrapToken();
+ const { address: account } = useAccount();
+ const { mutateAsync: approve } = useApproveAllowance();
+ const { mutateAsync: createOrder } = useCreateOrder();
+ const wToken = useNetwork()?.wToken.address;
+ return useMutation({
+ mutationFn: async () => {
+ try {
+ const srcTokenAddress = isNativeAddress(inToken?.address)
+ ? wToken
+ : inToken?.address;
+
+ const destTokenAddress = isNativeAddress(outToken?.address)
+ ? zeroAddress
+ : outToken?.address;
+ if (
+ !inToken ||
+ !account ||
+ !parsedInputAmount ||
+ !outToken ||
+ !srcTokenAddress ||
+ !destTokenAddress
+ ) {
+ throw new Error("Missing required dependencies");
+ }
+
+ updateState({ swapStatus: SwapStatus.LOADING });
+
+ const steps = getSteps({
+ inTokenAddress: inToken.address,
+ requiresApproval,
+ });
+ updateState({ steps });
+
+ if (steps.includes(SwapSteps.Wrap)) {
+ updateState({ currentStep: SwapSteps.Wrap });
+ try {
+ twapSDK.analytics.onWrapRequest();
+ await wrap(parsedInputAmount);
+ twapSDK.analytics.onWrapSuccess();
+ } catch (error) {
+ twapSDK.analytics.onWrapError(error);
+ throw error;
+ }
+ // wrap
+ }
+
+ if (steps.includes(SwapSteps.Approve)) {
+ updateState({ currentStep: SwapSteps.Approve });
+ try {
+ twapSDK.analytics.onApproveRequest();
+ await approve({
+ spender: twapSDK.config.twapAddress,
+ token: srcTokenAddress,
+ amount: parsedInputAmount,
+ });
+ twapSDK.analytics.onApproveSuccess();
+ } catch (error) {
+ twapSDK.analytics.onApproveError(error);
+ throw error;
+ }
+ }
+ updateState({ currentStep: SwapSteps.Swap });
+ const response = await createOrder({
+ srcTokenAddress,
+ destTokenAddress,
+ });
+ updateState({ swapStatus: SwapStatus.SUCCESS });
+ return response.orderID;
+ } catch (error) {
+ if (isTxRejected(error)) {
+ updateState({ swapStatus: undefined });
+ } else {
+ updateState({ swapStatus: SwapStatus.FAILED });
+ toast.error("Create order failed");
+ }
+ }
+ },
+ });
+}
diff --git a/tsconfig.app.tsbuildinfo b/tsconfig.app.tsbuildinfo
index 656d038..e55ee4a 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/approveallowance.ts","./src/lib/getrequiresapproval.ts","./src/lib/index.ts","./src/lib/networks.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/utils.ts","./src/lib/wagmi-config.ts","./src/lib/wraptoken.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/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/twap/context.tsx","./src/trade/twap/hooks.ts","./src/trade/twap/twap-confirmation-dialog.tsx","./src/trade/twap/twap.tsx","./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"],"version":"5.6.2"}
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index 6eaa34b..687e617 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -975,18 +975,18 @@
resolved "https://registry.npmjs.org/@orbs-network/swap-ui/-/swap-ui-0.0.14.tgz"
integrity sha512-19Blk3JYsxae6Eu8a/nsLA8EbNSMQSJfsgV7Tg52RPs6IglTjEwfGyjy3HUPzRqEYXiHCQFo8xGNHjSKx3HJ5g==
-"@orbs-network/twap-sdk@^2.0.38":
- version "2.0.38"
- resolved "https://registry.npmjs.org/@orbs-network/twap-sdk/-/twap-sdk-2.0.38.tgz"
- integrity sha512-U7nBRA7tghIWQPbhdqqPOTm6VyoEVGHmjkZKE1ddYyAvQLSi+V/7Pnn1xi7OP7xYSBCl0YmmA3C/GPYGJGdfVA==
+"@orbs-network/twap-sdk@^2.0.40":
+ version "2.0.40"
+ resolved "https://registry.yarnpkg.com/@orbs-network/twap-sdk/-/twap-sdk-2.0.40.tgz#db88ecdcb7380af9e8e185faa432338aa0c7a772"
+ integrity sha512-9tEQXeahzovdKuPHV4uxyA2JEA1vDYqcwPQhmMO5b6Y2pvdviTn/A4k24uqVaQJt+T8GTjgB9L1dHSr65DWV6w==
dependencies:
"@orbs-network/twap" "^2.0.1"
bignumber.js "9.x"
"@orbs-network/twap@^2.0.1":
- version "2.2.4"
- resolved "https://registry.npmjs.org/@orbs-network/twap/-/twap-2.2.4.tgz"
- integrity sha512-SeEH45f4KXh6hXjbhhE4lPgTzIvMNx9Mun+pdX9plvdKpWAbcg6f1FKfv2MZ1ghtYxHlhuDcthlx159t8ReiOA==
+ version "2.2.7"
+ resolved "https://registry.yarnpkg.com/@orbs-network/twap/-/twap-2.2.7.tgz#5d50c3d2eebf969b0ce51f1fed749a08dc093e1d"
+ integrity sha512-tS3gpg3bI6hlz/9cQj3YB3C9R5rXLEla6KcM1Aom6O01UUvMQN2dAK56Nqz0uaqTsQoB+fveBGHW27g1qTAkSA==
"@paraswap/core@2.2.0":
version "2.2.0"