@typus/typus-perp-sdk 1.1.0 → 1.1.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.
@@ -84,7 +84,7 @@ function createTradingOrder(config, tx, pythClient, input) {
84
84
  tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
85
85
  cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
86
86
  baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
87
- if (TOKEN == constants_1.tokenType.MAINNET.SUI && config.sponsored) {
87
+ if (TOKEN == "SUI" && config.sponsored) {
88
88
  // split together
89
89
  _a = __read((0, utils_1.splitCoins)(tx, constants_1.tokenType.MAINNET.SUI, input.coins, [input.amount, tokens.length.toString()], config.sponsored), 2), coin = _a[0], suiCoin = _a[1];
90
90
  }
@@ -177,7 +177,7 @@ function increaseCollateral(config, tx, pythClient, input) {
177
177
  tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
178
178
  cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
179
179
  baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
180
- if (TOKEN == constants_1.tokenType.MAINNET.SUI && config.sponsored) {
180
+ if (TOKEN == "SUI" && config.sponsored) {
181
181
  // split together
182
182
  _a = __read((0, utils_1.splitCoins)(tx, constants_1.tokenType.MAINNET.SUI, input.coins, [input.amount, tokens.length.toString()], config.sponsored), 2), coin = _a[0], suiCoin = _a[1];
183
183
  }
@@ -102,7 +102,7 @@ function mintStakeLp(config, tx, pythClient, input) {
102
102
  case 0:
103
103
  tokens = input.lpPool.tokenPools.map(function (p) { return (0, constants_1.typeArgToAsset)("0x" + p.tokenType.name); });
104
104
  cToken = constants_1.tokenType[__1.NETWORK][input.cTOKEN];
105
- if (input.cTOKEN == constants_1.tokenType.MAINNET.SUI && config.sponsored) {
105
+ if (input.cTOKEN == "SUI" && config.sponsored) {
106
106
  // split together
107
107
  _a = __read((0, utils_1.splitCoins)(tx, constants_1.tokenType.MAINNET.SUI, input.coins, [input.amount, tokens.length.toString()], config.sponsored), 2), coin = _a[0], suiCoin = _a[1];
108
108
  }
@@ -406,7 +406,7 @@ function swap(config, tx, pythClient, input) {
406
406
  case 0:
407
407
  fromToken = constants_1.tokenType[__1.NETWORK][input.FROM_TOKEN];
408
408
  toToken = constants_1.tokenType[__1.NETWORK][input.TO_TOKEN];
409
- if (input.FROM_TOKEN == constants_1.tokenType.MAINNET.SUI && config.sponsored) {
409
+ if (input.FROM_TOKEN == "SUI" && config.sponsored) {
410
410
  // split together
411
411
  _a = __read((0, utils_1.splitCoins)(tx, constants_1.tokenType.MAINNET.SUI, input.coins, [input.amount, "2"], config.sponsored), 2), coin = _a[0], suiCoin = _a[1];
412
412
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typus/typus-perp-sdk",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
5
5
  "author": "Typus",
6
6
  "description": "typus perp sdk",