impermax-sdk 1.1.39 → 1.1.41

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.
@@ -8,6 +8,7 @@ export default class OffchainAccountBorrowable extends OffchainAccountPoolToken
8
8
  protected readonly poolToken: OffchainBorrowable;
9
9
  constructor(lendingPool: OffchainAccountLendingPool, poolTokenType: PoolTokenType);
10
10
  getLendingPool: () => OffchainAccountLendingPool;
11
+ getPoolToken: () => OffchainBorrowable;
11
12
  private getSupplyPosition;
12
13
  getAmount(): Promise<number>;
13
14
  private getBorrowPosition;
@@ -17,6 +17,7 @@ class OffchainAccountBorrowable extends offchainAccountPoolToken_1.default {
17
17
  constructor(lendingPool, poolTokenType) {
18
18
  super();
19
19
  this.getLendingPool = () => this.lendingPool;
20
+ this.getPoolToken = () => this.poolToken;
20
21
  this.lendingPool = lendingPool;
21
22
  this.poolTokenType = poolTokenType;
22
23
  this.poolToken = lendingPool.getLendingPool().getPoolToken(poolTokenType);
@@ -7,6 +7,7 @@ export default class OffchainAccountCollateral extends OffchainAccountPoolToken
7
7
  protected readonly poolToken: OffchainCollateral;
8
8
  constructor(lendingPool: OffchainAccountLendingPool);
9
9
  getLendingPool: () => OffchainAccountLendingPool;
10
+ getPoolToken: () => OffchainCollateral;
10
11
  getCollateralPosition(): Promise<CollateralPosition | undefined>;
11
12
  getAmount(): Promise<number>;
12
13
  }
@@ -17,6 +17,7 @@ class OffchainAccountCollateral extends offchainAccountPoolToken_1.default {
17
17
  constructor(lendingPool) {
18
18
  super();
19
19
  this.getLendingPool = () => this.lendingPool;
20
+ this.getPoolToken = () => this.poolToken;
20
21
  this.lendingPool = lendingPool;
21
22
  this.poolToken = lendingPool.getLendingPool().getCollateral();
22
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",