@kamino-finance/kliquidity-sdk 8.4.2 → 8.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kamino-finance/kliquidity-sdk",
3
- "version": "8.4.2",
3
+ "version": "8.4.4",
4
4
  "description": "Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol",
5
5
  "repository": {
6
6
  "type": "git",
package/src/Kamino.ts CHANGED
@@ -4503,7 +4503,7 @@ export class Kamino {
4503
4503
  };
4504
4504
  };
4505
4505
 
4506
- private getStartEndTicketIndexProgramAddressesOrca = async (
4506
+ getStartEndTickIndexProgramAddressesOrca = async (
4507
4507
  whirlpool: Address,
4508
4508
  whirlpoolState: Whirlpool,
4509
4509
  tickLowerIndex: number,
@@ -4775,14 +4775,8 @@ export class Kamino {
4775
4775
  const decimalsA = await getMintDecimals(this._rpc, whirlpool.tokenMintA);
4776
4776
  const decimalsB = await getMintDecimals(this._rpc, whirlpool.tokenMintB);
4777
4777
 
4778
- const tickLowerIndex = orcaGetTickArrayStartTickIndex(
4779
- orcaPriceToTickIndex(priceLower.toNumber(), decimalsA, decimalsB),
4780
- whirlpool.tickSpacing
4781
- );
4782
- const tickUpperIndex = orcaGetTickArrayStartTickIndex(
4783
- orcaPriceToTickIndex(priceUpper.toNumber(), decimalsA, decimalsB),
4784
- whirlpool.tickSpacing
4785
- );
4778
+ const tickLowerIndex = orcaPriceToTickIndex(priceLower.toNumber(), decimalsA, decimalsB);
4779
+ const tickUpperIndex = orcaPriceToTickIndex(priceUpper.toNumber(), decimalsA, decimalsB);
4786
4780
 
4787
4781
  const { position, positionBump, positionMetadata } = await this.getMetadataProgramAddressesOrca(
4788
4782
  positionMint.address
@@ -4796,8 +4790,12 @@ export class Kamino {
4796
4790
  bump: positionBump,
4797
4791
  };
4798
4792
 
4799
- const { lowerTick: startTickIndex, upperTick: endTickIndex } =
4800
- await this.getStartEndTicketIndexProgramAddressesOrca(pool, whirlpool, tickLowerIndex, tickUpperIndex);
4793
+ const { lowerTick: startTickIndex, upperTick: endTickIndex } = await this.getStartEndTickIndexProgramAddressesOrca(
4794
+ pool,
4795
+ whirlpool,
4796
+ tickLowerIndex,
4797
+ tickUpperIndex
4798
+ );
4801
4799
 
4802
4800
  const globalConfig = await this.getGlobalConfigState(this._globalConfig);
4803
4801
  if (!globalConfig) {