@gearbox-protocol/sdk 3.0.0-vfour.82 → 3.0.0-vfour.83

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.
@@ -22255,9 +22255,10 @@ var MarketRegister = class extends SDKConstruct {
22255
22255
  return this.markets.flatMap((market) => market.creditManagers);
22256
22256
  }
22257
22257
  findCreditManager(creditManager) {
22258
+ const addr = creditManager.toLowerCase();
22258
22259
  for (const market of this.markets) {
22259
22260
  for (const cm of market.creditManagers) {
22260
- if (cm.creditManager.address === creditManager) {
22261
+ if (cm.creditManager.address.toLowerCase() === addr) {
22261
22262
  return cm;
22262
22263
  }
22263
22264
  }
@@ -22265,9 +22266,10 @@ var MarketRegister = class extends SDKConstruct {
22265
22266
  throw new Error(`cannot find credit manager ${creditManager}`);
22266
22267
  }
22267
22268
  findByCreditManager(creditManager) {
22269
+ const addr = creditManager.toLowerCase();
22268
22270
  const market = this.markets.find(
22269
22271
  (m) => m.creditManagers.some(
22270
- (cm) => cm.creditManager.address.toLowerCase() === creditManager.toLowerCase()
22272
+ (cm) => cm.creditManager.address.toLowerCase() === addr
22271
22273
  )
22272
22274
  );
22273
22275
  if (!market) {
@@ -22276,8 +22278,9 @@ var MarketRegister = class extends SDKConstruct {
22276
22278
  return market;
22277
22279
  }
22278
22280
  findByPriceOracle(address) {
22281
+ const addr = address.toLowerCase();
22279
22282
  for (const market of this.markets) {
22280
- if (market.priceOracle.address.toLowerCase() === address.toLowerCase()) {
22283
+ if (market.priceOracle.address.toLowerCase() === addr) {
22281
22284
  return market;
22282
22285
  }
22283
22286
  }
@@ -22253,9 +22253,10 @@ var MarketRegister = class extends SDKConstruct {
22253
22253
  return this.markets.flatMap((market) => market.creditManagers);
22254
22254
  }
22255
22255
  findCreditManager(creditManager) {
22256
+ const addr = creditManager.toLowerCase();
22256
22257
  for (const market of this.markets) {
22257
22258
  for (const cm of market.creditManagers) {
22258
- if (cm.creditManager.address === creditManager) {
22259
+ if (cm.creditManager.address.toLowerCase() === addr) {
22259
22260
  return cm;
22260
22261
  }
22261
22262
  }
@@ -22263,9 +22264,10 @@ var MarketRegister = class extends SDKConstruct {
22263
22264
  throw new Error(`cannot find credit manager ${creditManager}`);
22264
22265
  }
22265
22266
  findByCreditManager(creditManager) {
22267
+ const addr = creditManager.toLowerCase();
22266
22268
  const market = this.markets.find(
22267
22269
  (m) => m.creditManagers.some(
22268
- (cm) => cm.creditManager.address.toLowerCase() === creditManager.toLowerCase()
22270
+ (cm) => cm.creditManager.address.toLowerCase() === addr
22269
22271
  )
22270
22272
  );
22271
22273
  if (!market) {
@@ -22274,8 +22276,9 @@ var MarketRegister = class extends SDKConstruct {
22274
22276
  return market;
22275
22277
  }
22276
22278
  findByPriceOracle(address) {
22279
+ const addr = address.toLowerCase();
22277
22280
  for (const market of this.markets) {
22278
- if (market.priceOracle.address.toLowerCase() === address.toLowerCase()) {
22281
+ if (market.priceOracle.address.toLowerCase() === addr) {
22279
22282
  return market;
22280
22283
  }
22281
22284
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-vfour.82",
3
+ "version": "3.0.0-vfour.83",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.cjs",