From fd62f36b138ff4db331d1a85c86c121019735a7d Mon Sep 17 00:00:00 2001 From: ogous Date: Thu, 29 Aug 2024 16:07:11 +0300 Subject: [PATCH] fix: subtract as lower tick --- web/src/components/StakeForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/StakeForm.tsx b/web/src/components/StakeForm.tsx index f34e13ad..5b491d74 100644 --- a/web/src/components/StakeForm.tsx +++ b/web/src/components/StakeForm.tsx @@ -278,7 +278,7 @@ export const StakeForm = ({ mode, poolId, positionId }: StakeFormProps) => { const delta = cur === upper ? 1n : 0n; // delta is a guard for same lower and upper ticks const liq = getLiquidityForAmount0( - cur + delta, + cur - delta, upper, BigInt(token0AmountRaw), ); @@ -289,7 +289,7 @@ export const StakeForm = ({ mode, poolId, positionId }: StakeFormProps) => { // delta is a guard for same lower and upper ticks const delta = cur === lower ? 1n : 0n; const liq = getLiquidityForAmount1( - cur + delta, + cur - delta, lower, BigInt(token1AmountRaw), );