@gearbox-protocol/sdk 4.1.2 → 4.1.3

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.
@@ -38,7 +38,7 @@ class AbstractAddressProviderContract extends import_base.BaseContract {
38
38
  this.#addresses[k] = {};
39
39
  }
40
40
  this.#addresses[k][version] = address;
41
- if (!this.#latest[k] || version > this.#latest[key]) {
41
+ if (!this.#latest[k] || version > this.#latest[k]) {
42
42
  this.#latest[k] = version;
43
43
  }
44
44
  this.logger?.debug(`Set address for ${k}@${version} to ${address}`);
@@ -67,7 +67,8 @@ class AbstractAddressProviderContract extends import_base.BaseContract {
67
67
  }
68
68
  let version = 0;
69
69
  let address;
70
- for (const [v, a] of import_mappers.TypedObjectUtils.entries(allVersions)) {
70
+ for (const [vStr, a] of import_mappers.TypedObjectUtils.entries(allVersions)) {
71
+ const v = Number(vStr);
71
72
  if (v >= range[0] && v <= range[1] && v >= version) {
72
73
  version = v;
73
74
  address = a;
@@ -15,7 +15,7 @@ class AbstractAddressProviderContract extends BaseContract {
15
15
  this.#addresses[k] = {};
16
16
  }
17
17
  this.#addresses[k][version] = address;
18
- if (!this.#latest[k] || version > this.#latest[key]) {
18
+ if (!this.#latest[k] || version > this.#latest[k]) {
19
19
  this.#latest[k] = version;
20
20
  }
21
21
  this.logger?.debug(`Set address for ${k}@${version} to ${address}`);
@@ -44,7 +44,8 @@ class AbstractAddressProviderContract extends BaseContract {
44
44
  }
45
45
  let version = 0;
46
46
  let address;
47
- for (const [v, a] of TypedObjectUtils.entries(allVersions)) {
47
+ for (const [vStr, a] of TypedObjectUtils.entries(allVersions)) {
48
+ const v = Number(vStr);
48
49
  if (v >= range[0] && v <= range[1] && v >= version) {
49
50
  version = v;
50
51
  address = a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",