@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sodax/dapp-kit",
3
3
  "license": "MIT",
4
- "version": "1.5.6-beta",
4
+ "version": "1.5.7-beta",
5
5
  "description": "dapp-kit of New World",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "viem": "2.29.2",
19
- "@sodax/sdk": "1.5.6-beta",
20
- "@sodax/types": "1.5.6-beta"
19
+ "@sodax/sdk": "1.5.7-beta",
20
+ "@sodax/types": "1.5.7-beta"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/react": "19.0.8",
@@ -109,7 +109,13 @@ export function useLiquidityAmounts(
109
109
  try {
110
110
  const amount0BigInt = BigInt(Math.floor(amount0 * 10 ** poolData.token0.decimals));
111
111
 
112
- const amount1BigInt = ClService.calculateAmount1FromAmount0(amount0BigInt, tickLower, tickUpper, currentTick);
112
+ const amount1BigInt = ClService.calculateAmount1FromAmount0(
113
+ amount0BigInt,
114
+ tickLower,
115
+ tickUpper,
116
+ currentTick,
117
+ poolData.sqrtPriceX96,
118
+ );
113
119
 
114
120
  const amount1 = Number(amount1BigInt) / 10 ** poolData.token1.decimals;
115
121
  setLiquidityToken1Amount(amount1.toFixed(6));
@@ -140,7 +146,13 @@ export function useLiquidityAmounts(
140
146
  try {
141
147
  const amount1BigInt = BigInt(Math.floor(amount1 * 10 ** poolData.token1.decimals));
142
148
 
143
- const amount0BigInt = ClService.calculateAmount0FromAmount1(amount1BigInt, tickLower, tickUpper, currentTick);
149
+ const amount0BigInt = ClService.calculateAmount0FromAmount1(
150
+ amount1BigInt,
151
+ tickLower,
152
+ tickUpper,
153
+ currentTick,
154
+ poolData.sqrtPriceX96,
155
+ );
144
156
 
145
157
  const amount0 = Number(amount0BigInt) / 10 ** poolData.token0.decimals;
146
158
  setLiquidityToken0Amount(amount0.toFixed(6));