From 564df363c655601dc7b9b92769adb03488db3461 Mon Sep 17 00:00:00 2001 From: lilchizh Date: Tue, 7 Nov 2023 05:56:08 +0300 Subject: [PATCH] (limit-orders) Set to market fix, Market Depth chart mobile --- src/components/limit-orders/LimitOrder/index.tsx | 2 +- src/components/swap/MarketDepthChart/index.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/limit-orders/LimitOrder/index.tsx b/src/components/limit-orders/LimitOrder/index.tsx index 9638465..6de175d 100644 --- a/src/components/limit-orders/LimitOrder/index.tsx +++ b/src/components/limit-orders/LimitOrder/index.tsx @@ -37,7 +37,7 @@ const LimitOrder = () => { const initialSellPrice = useMemo(() => { if (!pool) return ""; - const _newPrice = invertPrice ? getTickToPrice(token1, token0, pool.tickCurrent) : getTickToPrice(token0, token1, pool.tickCurrent); + const _newPrice = invertPrice ? getTickToPrice(token1, token0, pool.tickCurrent - pool.tickSpacing) : getTickToPrice(token0, token1, pool.tickCurrent + pool.tickSpacing); return _newPrice?.toSignificant(_newPrice.baseCurrency.decimals / 2); }, [pool, token0, token1, invertPrice]); diff --git a/src/components/swap/MarketDepthChart/index.tsx b/src/components/swap/MarketDepthChart/index.tsx index 89c14b0..70eac70 100644 --- a/src/components/swap/MarketDepthChart/index.tsx +++ b/src/components/swap/MarketDepthChart/index.tsx @@ -172,15 +172,15 @@ const MarketDepthChart = ({ currencyA, currencyB, isOpen, close }: MarketDepthCh }, [highestTick, lowestTick, limitOrderTick, tickAfterSwap]) - return
+ return
-
+
@@ -191,7 +191,7 @@ const MarketDepthChart = ({ currencyA, currencyB, isOpen, close }: MarketDepthCh
{`Total (${currencyB?.symbol})`}
-
+