@sodax/dapp-kit 1.5.6-beta → 1.5.7-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2092,7 +2092,13 @@ function useLiquidityAmounts(minPrice, maxPrice, poolData) {
2092
2092
  }
2093
2093
  try {
2094
2094
  const amount0BigInt = BigInt(Math.floor(amount0 * 10 ** poolData.token0.decimals));
2095
- const amount1BigInt = sdk.ClService.calculateAmount1FromAmount0(amount0BigInt, tickLower, tickUpper, currentTick);
2095
+ const amount1BigInt = sdk.ClService.calculateAmount1FromAmount0(
2096
+ amount0BigInt,
2097
+ tickLower,
2098
+ tickUpper,
2099
+ currentTick,
2100
+ poolData.sqrtPriceX96
2101
+ );
2096
2102
  const amount1 = Number(amount1BigInt) / 10 ** poolData.token1.decimals;
2097
2103
  setLiquidityToken1Amount(amount1.toFixed(6));
2098
2104
  } catch (err) {
@@ -2114,7 +2120,13 @@ function useLiquidityAmounts(minPrice, maxPrice, poolData) {
2114
2120
  }
2115
2121
  try {
2116
2122
  const amount1BigInt = BigInt(Math.floor(amount1 * 10 ** poolData.token1.decimals));
2117
- const amount0BigInt = sdk.ClService.calculateAmount0FromAmount1(amount1BigInt, tickLower, tickUpper, currentTick);
2123
+ const amount0BigInt = sdk.ClService.calculateAmount0FromAmount1(
2124
+ amount1BigInt,
2125
+ tickLower,
2126
+ tickUpper,
2127
+ currentTick,
2128
+ poolData.sqrtPriceX96
2129
+ );
2118
2130
  const amount0 = Number(amount0BigInt) / 10 ** poolData.token0.decimals;
2119
2131
  setLiquidityToken0Amount(amount0.toFixed(6));
2120
2132
  } catch (err) {