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.
- package/lib/offchain/offchain.js +6 -1
- package/package.json +1 -1
package/lib/offchain/offchain.js
CHANGED
|
@@ -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
|
-
|
|
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) {
|