impermax-sdk 1.2.40 → 1.2.41

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.
@@ -36,7 +36,8 @@ const coingecko_ids = {
36
36
  "0x5756a28e2aae01f600fc2c01358395f5c1f8ad3a": "vesync",
37
37
  "0x160e07e42adbc1fce92d505b579bcd8a3fbea77d": "dracula-fi",
38
38
  // Scroll
39
- "0x1a2fcb585b327fadec91f55d45829472b15f17a4": "tokan"
39
+ "0x1a2fcb585b327fadec91f55d45829472b15f17a4": "tokan",
40
+ "0x78ab77f7d590fb101aa18affc238cbfea31ead5b": "impermax"
40
41
  };
41
42
  class OffchainPriceHelper {
42
43
  constructor(offchain) {
@@ -162,8 +163,7 @@ class OffchainPriceHelper {
162
163
  "0xea6887e4a9cda1b77e70129e5fba830cdb5cddef",
163
164
  "0x60bb3d364b765c497c8ce50ae0ae3f0882c5bd05",
164
165
  "0x900f1ec5819fa087d368877cd03b265bf1802667",
165
- "0xea38f1ccf77bf43f352636241b05dd8f6f5f52b2",
166
- "0x78ab77f7d590fb101aa18affc238cbfea31ead5b" // scroll ibex
166
+ "0xea38f1ccf77bf43f352636241b05dd8f6f5f52b2"
167
167
  ].includes(tokenAddress.toLowerCase())) { // fix for IMX
168
168
  return 0;
169
169
  }
@@ -109,6 +109,7 @@ class OnchainAccountBorrowable extends onchainAccountPoolToken_1.default {
109
109
  borrowAmount += jump;
110
110
  }
111
111
  }
112
+ bestAmount = bestAmount > availableCash ? availableCash : bestAmount;
112
113
  return bestAmount;
113
114
  });
114
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "1.2.40",
3
+ "version": "1.2.41",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",