@meteora-ag/cp-amm-sdk 1.0.8 → 1.0.9

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/index.d.mts CHANGED
@@ -6425,7 +6425,7 @@ declare class CpAmm {
6425
6425
  claimPositionFee(params: ClaimPositionFeeParams): TxBuilder;
6426
6426
  /**
6427
6427
  * Builds a transaction to claim position fee rewards.
6428
- * @param {ClaimPositionFeeParams} params - Parameters for claiming position fee.
6428
+ * @param {ClaimPositionFeeParams2} params - Parameters for claiming position fee.
6429
6429
  * @returns Transaction builder.
6430
6430
  */
6431
6431
  claimPositionFee2(params: ClaimPositionFeeParams2): TxBuilder;
package/dist/index.d.ts CHANGED
@@ -6425,7 +6425,7 @@ declare class CpAmm {
6425
6425
  claimPositionFee(params: ClaimPositionFeeParams): TxBuilder;
6426
6426
  /**
6427
6427
  * Builds a transaction to claim position fee rewards.
6428
- * @param {ClaimPositionFeeParams} params - Parameters for claiming position fee.
6428
+ * @param {ClaimPositionFeeParams2} params - Parameters for claiming position fee.
6429
6429
  * @returns Transaction builder.
6430
6430
  */
6431
6431
  claimPositionFee2(params: ClaimPositionFeeParams2): TxBuilder;
package/dist/index.js CHANGED
@@ -9928,7 +9928,7 @@ var CpAmm = class {
9928
9928
  }
9929
9929
  /**
9930
9930
  * Builds a transaction to claim position fee rewards.
9931
- * @param {ClaimPositionFeeParams} params - Parameters for claiming position fee.
9931
+ * @param {ClaimPositionFeeParams2} params - Parameters for claiming position fee.
9932
9932
  * @returns Transaction builder.
9933
9933
  */
9934
9934
  claimPositionFee2(params) {
@@ -9948,14 +9948,22 @@ var CpAmm = class {
9948
9948
  tokenBProgram
9949
9949
  } = params;
9950
9950
  const payer = feePayer != null ? feePayer : owner;
9951
+ let tokenAOwner = receiver;
9952
+ let tokenBOwner = receiver;
9953
+ if (tokenAMint.equals(_spltoken.NATIVE_MINT)) {
9954
+ tokenAOwner = owner;
9955
+ }
9956
+ if (tokenBMint.equals(_spltoken.NATIVE_MINT)) {
9957
+ tokenBOwner = owner;
9958
+ }
9951
9959
  const {
9952
9960
  tokenAAta: tokenAAccount,
9953
9961
  tokenBAta: tokenBAccount,
9954
9962
  instructions: preInstruction
9955
9963
  } = yield this.prepareTokenAccounts({
9956
9964
  payer,
9957
- tokenAOwner: owner,
9958
- tokenBOwner: owner,
9965
+ tokenAOwner,
9966
+ tokenBOwner,
9959
9967
  tokenAMint,
9960
9968
  tokenBMint,
9961
9969
  tokenAProgram,