impermax-sdk 2.1.355 → 2.1.356

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.
@@ -147,7 +147,12 @@ class Offchain {
147
147
  }
148
148
  async getLendingPool(factory, pairAddress) {
149
149
  await this.getLendingPoolsData(); // make sure that lending pools are initialized
150
- return this.lendingPools[factory][pairAddress];
150
+ if (!this.lendingPools)
151
+ return null;
152
+ const lendingPoolFactory = this.lendingPools[factory];
153
+ if (!lendingPoolFactory)
154
+ return null;
155
+ return lendingPoolFactory[pairAddress];
151
156
  }
152
157
  // NOTE: We need to update this to return vault based on its type..
153
158
  async getVault(vaultAddress) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "2.1.355",
3
+ "version": "2.1.356",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",