@myx-trade/sdk 0.1.161 → 0.1.163

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
@@ -1821,7 +1821,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1821
1821
  // package.json
1822
1822
  var package_default = {
1823
1823
  name: "@myx-trade/sdk",
1824
- version: "0.1.161",
1824
+ version: "0.1.163",
1825
1825
  private: false,
1826
1826
  publishConfig: {
1827
1827
  access: "public"
@@ -21092,7 +21092,7 @@ var Account = class {
21092
21092
  async getAvailableMarginBalance({ poolId, chainId, address }) {
21093
21093
  try {
21094
21094
  const poolListRes = await getPoolList();
21095
- if (poolListRes.code !== 0) {
21095
+ if (poolListRes.code !== 9200) {
21096
21096
  throw new MyxSDKError(
21097
21097
  "REQUEST_FAILED" /* RequestFailed */,
21098
21098
  "Failed to get pool list"
@@ -21133,9 +21133,10 @@ var Account = class {
21133
21133
  const availableAccountMarginBalance = accountMargin - usedMargin;
21134
21134
  return availableAccountMarginBalance;
21135
21135
  } catch (error) {
21136
+ this.logger.info("getAvailableMarginBalance error-->", error);
21136
21137
  throw new MyxSDKError(
21137
21138
  "REQUEST_FAILED" /* RequestFailed */,
21138
- "Failed to get orders"
21139
+ "Failed to get getAvailableMarginBalance"
21139
21140
  );
21140
21141
  }
21141
21142
  }
package/dist/index.mjs CHANGED
@@ -1731,7 +1731,7 @@ var RotationProvider = class extends BaseProvider {
1731
1731
  // package.json
1732
1732
  var package_default = {
1733
1733
  name: "@myx-trade/sdk",
1734
- version: "0.1.161",
1734
+ version: "0.1.163",
1735
1735
  private: false,
1736
1736
  publishConfig: {
1737
1737
  access: "public"
@@ -21002,7 +21002,7 @@ var Account = class {
21002
21002
  async getAvailableMarginBalance({ poolId, chainId, address }) {
21003
21003
  try {
21004
21004
  const poolListRes = await getPoolList();
21005
- if (poolListRes.code !== 0) {
21005
+ if (poolListRes.code !== 9200) {
21006
21006
  throw new MyxSDKError(
21007
21007
  "REQUEST_FAILED" /* RequestFailed */,
21008
21008
  "Failed to get pool list"
@@ -21043,9 +21043,10 @@ var Account = class {
21043
21043
  const availableAccountMarginBalance = accountMargin - usedMargin;
21044
21044
  return availableAccountMarginBalance;
21045
21045
  } catch (error) {
21046
+ this.logger.info("getAvailableMarginBalance error-->", error);
21046
21047
  throw new MyxSDKError(
21047
21048
  "REQUEST_FAILED" /* RequestFailed */,
21048
- "Failed to get orders"
21049
+ "Failed to get getAvailableMarginBalance"
21049
21050
  );
21050
21051
  }
21051
21052
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myx-trade/sdk",
3
- "version": "0.1.161",
3
+ "version": "0.1.163",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"