@kamino-finance/kliquidity-sdk 8.4.0 → 8.4.2

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.0",
3
+ "version": "8.4.2",
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
@@ -1914,7 +1914,7 @@ export class Kamino {
1914
1914
  }
1915
1915
  };
1916
1916
 
1917
- private getTokenAccountBalance = async (tokenAccount: Address): Promise<Decimal> => {
1917
+ getTokenAccountBalance = async (tokenAccount: Address): Promise<Decimal> => {
1918
1918
  const tokenAccountBalance = await this._rpc.getTokenAccountBalance(tokenAccount).send();
1919
1919
  if (!tokenAccountBalance.value) {
1920
1920
  throw new Error(`Could not get token account balance for ${tokenAccount.toString()}.`);
@@ -1926,7 +1926,7 @@ export class Kamino {
1926
1926
  * Get the balance of a token account or 0 if it doesn't exist
1927
1927
  * @param tokenAccount
1928
1928
  */
1929
- private getTokenAccountBalanceOrZero = async (tokenAccount: Address): Promise<Decimal> => {
1929
+ getTokenAccountBalanceOrZero = async (tokenAccount: Address): Promise<Decimal> => {
1930
1930
  const tokenAccountExists = await checkIfAccountExists(this._rpc, tokenAccount);
1931
1931
  if (tokenAccountExists) {
1932
1932
  return await this.getTokenAccountBalance(tokenAccount);
@@ -2728,6 +2728,7 @@ export class Kamino {
2728
2728
  keyOrDefault(strategyState.strategy.tokenBTokenProgram, TOKEN_PROGRAM_ADDRESS)
2729
2729
  ),
2730
2730
  ]);
2731
+ console.log('Shares ATA in withdraw: ', sharesAta.toString());
2731
2732
 
2732
2733
  const sharesAmountInLamports = sharesAmount.mul(
2733
2734
  new Decimal(10).pow(strategyState.strategy.sharesMintDecimals.toString())
@@ -2797,7 +2798,7 @@ export class Kamino {
2797
2798
  ...withdrawIx,
2798
2799
  accounts: withdrawIx.accounts?.concat([
2799
2800
  {
2800
- address: strategyState.strategy.raydiumPoolConfigOrBaseVaultAuthority,
2801
+ address: strategyState.strategy.raydiumProtocolPositionOrBaseVaultAuthority,
2801
2802
  role: AccountRole.WRITABLE,
2802
2803
  },
2803
2804
  ]),