impermax-sdk 2.1.457 → 2.1.459

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.
@@ -7,6 +7,6 @@ export default class OffchainNftlpAeroCL extends OffchainNftlpGenericCL {
7
7
  getNewAccountNftlpObject(accountCollateral: OffchainAccountCollateralV3): OffchainAccountNftlpAeroCL;
8
8
  protected tickSpacings: () => number[];
9
9
  initializeFullRangeRateAccurate(tickSpacing: number): Promise<number>;
10
- getRewardsToken(): Promise<string | undefined>;
10
+ getRewardsToken(): Promise<string>;
11
11
  getRewardsTokenPrice(): Promise<number>;
12
12
  }
@@ -32,7 +32,7 @@ class OffchainNftlpAeroCL extends offchainNftlpGenericCL_1.default {
32
32
  // TODO
33
33
  }
34
34
  async getRewardsToken() {
35
- return undefined;
35
+ return "";
36
36
  // TODO
37
37
  //const nftlpData = await this.getNftlpData() as NftlpGenericCLData;
38
38
  //return nftlpData.factory?.rewardsToken?.id
@@ -7,6 +7,6 @@ export default abstract class OnchainAccountNftlp {
7
7
  protected cache: {};
8
8
  constructor(collateral: OnchainAccountCollateralV3, nftlp: OnchainNftlp);
9
9
  getLendingPool: () => OnchainAccountLendingPoolV3;
10
- getNftlp: () => OnchainNftlp;
10
+ getNftlp(): OnchainNftlp;
11
11
  cleanCache(): void;
12
12
  }
@@ -4,10 +4,12 @@ class OnchainAccountNftlp {
4
4
  constructor(collateral, nftlp) {
5
5
  this.cache = {};
6
6
  this.getLendingPool = () => this.collateral.getLendingPool();
7
- this.getNftlp = () => this.nftlp;
8
7
  this.collateral = collateral;
9
8
  this.nftlp = nftlp;
10
9
  }
10
+ getNftlp() {
11
+ return this.nftlp;
12
+ }
11
13
  cleanCache() {
12
14
  this.cache = {};
13
15
  }
@@ -11,7 +11,7 @@ export default abstract class OnchainAccountNftlpGenericCL extends OnchainAccoun
11
11
  [keys in number]: Promise<GenericCLPosition>;
12
12
  };
13
13
  };
14
- getNftlp: () => OnchainNftlpGenericCL;
14
+ getNftlp(): OnchainNftlpGenericCL;
15
15
  protected abstract initializePositionData(tokenId: number): Promise<GenericCLPositionData>;
16
16
  protected getPositionData(tokenId: number): Promise<GenericCLPositionData>;
17
17
  abstract getTickSpacing(tokenId: number): Promise<number>;
@@ -10,7 +10,9 @@ class OnchainAccountNftlpGenericCL extends onchainAccountNftlp_1.default {
10
10
  constructor() {
11
11
  super(...arguments);
12
12
  this.cache = {};
13
- this.getNftlp = () => super.getNftlp();
13
+ }
14
+ getNftlp() {
15
+ return super.getNftlp();
14
16
  }
15
17
  async getPositionData(tokenId) {
16
18
  if (!this.cache.positionsData)
@@ -5,7 +5,7 @@ class OnchainNftlp {
5
5
  this.cache = {};
6
6
  this.getLendingPool = () => this.collateral.getLendingPool();
7
7
  this.getContractHelper = () => this.getLendingPool().getImpermaxFactory().getOnchain().getContractHelper();
8
- this.getRouter = () => this.getLendingPool().getImpermaxFactory().getRouterExtension(this.getNftlp().getExtension());
8
+ this.getRouter = () => this.getLendingPool().getImpermaxFactory().getRouterExtension(this.getExtension());
9
9
  this.getNftlpAddress = () => this.getLendingPool().getId();
10
10
  this.collateral = collateral;
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "2.1.457",
3
+ "version": "2.1.459",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",