impermax-sdk 2.1.175 → 2.1.176
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.
|
@@ -195,10 +195,10 @@ class UniswapV3Position {
|
|
|
195
195
|
}
|
|
196
196
|
getLiquidityGivenAmounts(amountX, amountY) {
|
|
197
197
|
if (amountX == 0) {
|
|
198
|
-
return amountY / Math.sqrt(this.
|
|
198
|
+
return amountY / Math.sqrt(this.priceB);
|
|
199
199
|
}
|
|
200
200
|
if (amountY == 0) {
|
|
201
|
-
return amountX * Math.sqrt(this.
|
|
201
|
+
return amountX * Math.sqrt(this.priceA);
|
|
202
202
|
}
|
|
203
203
|
return amountX / (1 / Math.sqrt(this.marketPrice) - 1 / Math.sqrt(this.priceB));
|
|
204
204
|
}
|