@drift-labs/sdk-browser 2.110.0-beta.0 → 2.110.0-beta.1
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/VERSION +1 -1
- package/lib/browser/user.js +1 -1
- package/lib/node/user.js +1 -1
- package/package.json +1 -1
- package/src/user.ts +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.110.0-beta.
|
|
1
|
+
2.110.0-beta.1
|
package/lib/browser/user.js
CHANGED
|
@@ -1568,7 +1568,7 @@ class User {
|
|
|
1568
1568
|
// selling asset to close borrow
|
|
1569
1569
|
(inTokenAmount.gt(numericConstants_1.ZERO) && outTokenAmount.lt(numericConstants_1.ZERO)) ||
|
|
1570
1570
|
// buying asset with higher initial asset weight
|
|
1571
|
-
inAssetWeight.
|
|
1571
|
+
inAssetWeight.lte(outAssetWeight);
|
|
1572
1572
|
if (freeCollateral.lt(numericConstants_1.PRICE_PRECISION.divn(100))) {
|
|
1573
1573
|
if (outSaferThanIn && inTokenAmount.gt(numericConstants_1.ZERO)) {
|
|
1574
1574
|
inSwap = inTokenAmount;
|
package/lib/node/user.js
CHANGED
|
@@ -1568,7 +1568,7 @@ class User {
|
|
|
1568
1568
|
// selling asset to close borrow
|
|
1569
1569
|
(inTokenAmount.gt(numericConstants_1.ZERO) && outTokenAmount.lt(numericConstants_1.ZERO)) ||
|
|
1570
1570
|
// buying asset with higher initial asset weight
|
|
1571
|
-
inAssetWeight.
|
|
1571
|
+
inAssetWeight.lte(outAssetWeight);
|
|
1572
1572
|
if (freeCollateral.lt(numericConstants_1.PRICE_PRECISION.divn(100))) {
|
|
1573
1573
|
if (outSaferThanIn && inTokenAmount.gt(numericConstants_1.ZERO)) {
|
|
1574
1574
|
inSwap = inTokenAmount;
|
package/package.json
CHANGED
package/src/user.ts
CHANGED
|
@@ -2982,7 +2982,7 @@ export class User {
|
|
|
2982
2982
|
// selling asset to close borrow
|
|
2983
2983
|
(inTokenAmount.gt(ZERO) && outTokenAmount.lt(ZERO)) ||
|
|
2984
2984
|
// buying asset with higher initial asset weight
|
|
2985
|
-
inAssetWeight.
|
|
2985
|
+
inAssetWeight.lte(outAssetWeight);
|
|
2986
2986
|
|
|
2987
2987
|
if (freeCollateral.lt(PRICE_PRECISION.divn(100))) {
|
|
2988
2988
|
if (outSaferThanIn && inTokenAmount.gt(ZERO)) {
|