@myx-trade/sdk 0.1.111 → 0.1.112

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
@@ -1822,7 +1822,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1822
1822
  // package.json
1823
1823
  var package_default = {
1824
1824
  name: "@myx-trade/sdk",
1825
- version: "0.1.111",
1825
+ version: "0.1.112",
1826
1826
  private: false,
1827
1827
  publishConfig: {
1828
1828
  access: "public"
@@ -14403,7 +14403,7 @@ var Order = class {
14403
14403
  message: "Failed to get tradable amount or wallet balance"
14404
14404
  };
14405
14405
  }
14406
- const totalBalance = BigInt(marginAccountBalance?.freeAmount.toString() ?? 0) + (marginAccountBalance?.tradeableProfit ? BigInt(marginAccountBalance?.tradeableProfit) : BigInt(0));
14406
+ const totalBalance = BigInt(marginAccountBalance?.freeAmount.toString() ?? 0) + (!marginAccountBalance?.tradeableProfit ? BigInt(marginAccountBalance?.tradeableProfit) : BigInt(0));
14407
14407
  let depositAmount = BigInt(networkFee) + BigInt(params.collateralAmount);
14408
14408
  if (totalBalance > 0) {
14409
14409
  depositAmount = depositAmount - totalBalance;
package/dist/index.mjs CHANGED
@@ -1732,7 +1732,7 @@ var RotationProvider = class extends BaseProvider {
1732
1732
  // package.json
1733
1733
  var package_default = {
1734
1734
  name: "@myx-trade/sdk",
1735
- version: "0.1.111",
1735
+ version: "0.1.112",
1736
1736
  private: false,
1737
1737
  publishConfig: {
1738
1738
  access: "public"
@@ -14313,7 +14313,7 @@ var Order = class {
14313
14313
  message: "Failed to get tradable amount or wallet balance"
14314
14314
  };
14315
14315
  }
14316
- const totalBalance = BigInt(marginAccountBalance?.freeAmount.toString() ?? 0) + (marginAccountBalance?.tradeableProfit ? BigInt(marginAccountBalance?.tradeableProfit) : BigInt(0));
14316
+ const totalBalance = BigInt(marginAccountBalance?.freeAmount.toString() ?? 0) + (!marginAccountBalance?.tradeableProfit ? BigInt(marginAccountBalance?.tradeableProfit) : BigInt(0));
14317
14317
  let depositAmount = BigInt(networkFee) + BigInt(params.collateralAmount);
14318
14318
  if (totalBalance > 0) {
14319
14319
  depositAmount = depositAmount - totalBalance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myx-trade/sdk",
3
- "version": "0.1.111",
3
+ "version": "0.1.112",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"