@gearbox-protocol/sdk 3.0.0-next.193 → 3.0.0-next.195
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.
|
@@ -225,12 +225,12 @@ class CreditManagerData {
|
|
|
225
225
|
static getTier(name) {
|
|
226
226
|
const DEFAULT_TIER = 99;
|
|
227
227
|
const l = name.split(" ") || [];
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
return DEFAULT_TIER;
|
|
228
|
+
const index = l.findIndex(w => w.toLowerCase() === "tier");
|
|
229
|
+
if (index < 0)
|
|
230
|
+
return DEFAULT_TIER;
|
|
231
|
+
const number = l[index + 1];
|
|
232
|
+
const n = Number(number || DEFAULT_TIER);
|
|
233
|
+
return Number.isNaN(n) ? DEFAULT_TIER : n;
|
|
234
234
|
}
|
|
235
235
|
static getType(name) {
|
|
236
236
|
const [identity = ""] = name.split(" ") || [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/sdk",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.195",
|
|
4
4
|
"description": "Gearbox SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@gearbox-protocol/bots-v3": "^1.5.1",
|
|
34
|
-
"@gearbox-protocol/sdk-gov": "^2.
|
|
34
|
+
"@gearbox-protocol/sdk-gov": "^2.7.0",
|
|
35
35
|
"axios": "^1.2.6",
|
|
36
36
|
"decimal.js-light": "^2.5.1",
|
|
37
37
|
"deep-eql": "^4.1.0",
|