impermax-sdk 2.1.12 → 2.1.13

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.
@@ -249,12 +249,13 @@ class OffchainLendingPool {
249
249
  // NOTE: Should this also include collateral totalBalanceUSD ?
250
250
  getTVL() {
251
251
  return __awaiter(this, void 0, void 0, function* () {
252
- const [supply0USD, supply1USD] = yield Promise.all([
252
+ const [supply0USD, supply1USD, totalBalanceUSD] = yield Promise.all([
253
253
  this.getBorrowableA().getSupplyUSD(),
254
254
  this.getBorrowableB().getSupplyUSD(),
255
+ this.getCollateral().getTotalBalanceUSD()
255
256
  ]);
256
- if (supply0USD && supply1USD)
257
- return supply0USD + supply1USD;
257
+ if (supply0USD && supply1USD && totalBalanceUSD)
258
+ return supply0USD + supply1USD + totalBalanceUSD;
258
259
  return 0;
259
260
  });
260
261
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "2.1.12",
3
+ "version": "2.1.13",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",