impermax-sdk 2.1.151 → 2.1.152
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.
|
@@ -137,6 +137,8 @@ class UniswapV3Position {
|
|
|
137
137
|
}
|
|
138
138
|
// divide and conquer implementation
|
|
139
139
|
getMaxDeltaDebtInRange(lowDeltaX, lowDeltaY, highDeltaX, highDeltaY) {
|
|
140
|
+
if (highDeltaX == 0 && highDeltaY == 0)
|
|
141
|
+
return [0, 0];
|
|
140
142
|
if (Math.abs(highDeltaX / lowDeltaX) < 1.001 || Math.abs(highDeltaY / lowDeltaY) < 1.001)
|
|
141
143
|
return [lowDeltaX, lowDeltaY];
|
|
142
144
|
const avgDeltaX = (lowDeltaX + highDeltaX) / 2;
|