@kamino-finance/kliquidity-sdk 8.4.3 → 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/dist/Kamino.d.ts +2 -2
- package/dist/Kamino.d.ts.map +1 -1
- package/dist/Kamino.js +4 -4
- package/dist/Kamino.js.map +1 -1
- package/package.json +1 -1
- package/src/Kamino.ts +9 -11
package/package.json
CHANGED
package/src/Kamino.ts
CHANGED
|
@@ -4503,7 +4503,7 @@ export class Kamino {
|
|
|
4503
4503
|
};
|
|
4504
4504
|
};
|
|
4505
4505
|
|
|
4506
|
-
|
|
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 =
|
|
4779
|
-
|
|
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
|
-
|
|
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) {
|