@hawksightco/hawk-sdk 1.3.115 → 1.3.117
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/src/hsToMeteora.js +6 -5
- package/package.json +1 -1
package/dist/src/hsToMeteora.js
CHANGED
|
@@ -1953,8 +1953,8 @@ class ClaimRewardAutomation extends HawksightMeteoraAutomationCpi {
|
|
|
1953
1953
|
* Adjusts transaction keys to facilitate the claiming of rewards.
|
|
1954
1954
|
*/
|
|
1955
1955
|
replace() {
|
|
1956
|
-
this._ix.keys[4].pubkey = this.userPda;
|
|
1957
|
-
this._ix.keys[4].isSigner = false;
|
|
1956
|
+
// this._ix.keys[4].pubkey = this.userPda;
|
|
1957
|
+
// this._ix.keys[4].isSigner = false;
|
|
1958
1958
|
}
|
|
1959
1959
|
/**
|
|
1960
1960
|
* Replaces Meteora CPI with Hawksight CPI that calls the target Meteora CPI.
|
|
@@ -1972,6 +1972,7 @@ class ClaimRewardAutomation extends HawksightMeteoraAutomationCpi {
|
|
|
1972
1972
|
const hawksightAuthority = addresses_1.HS_AUTHORITY;
|
|
1973
1973
|
// Generate owner fee ATA
|
|
1974
1974
|
const rewardMint = this.ix.keys[4].pubkey;
|
|
1975
|
+
console.log(`ClaimRewardAutomation rewardMint:`, rewardMint.toString());
|
|
1975
1976
|
const mintInfo = AccountCache_1.AccountCache.get(rewardMint);
|
|
1976
1977
|
if (!mintInfo) {
|
|
1977
1978
|
throw new Error("Unexpected error: Reward mint not found in cache.");
|
|
@@ -1980,13 +1981,13 @@ class ClaimRewardAutomation extends HawksightMeteoraAutomationCpi {
|
|
|
1980
1981
|
// Adjust by token type
|
|
1981
1982
|
const pdaTokenType = (_a = this.opt) === null || _a === void 0 ? void 0 : _a.pdaTokenType;
|
|
1982
1983
|
if (pdaTokenType === types_1.TokenType.LTA) {
|
|
1983
|
-
this.ix.keys[5].pubkey = util.generateLimitToken(this.userPda,
|
|
1984
|
+
this.ix.keys[5].pubkey = util.generateLimitToken(this.userPda, rewardMint);
|
|
1984
1985
|
}
|
|
1985
1986
|
else if (pdaTokenType === types_1.TokenType.STA) {
|
|
1986
|
-
this.ix.keys[5].pubkey = util.generateUserPdaStorageAccount(this.userPda,
|
|
1987
|
+
this.ix.keys[5].pubkey = util.generateUserPdaStorageAccount(this.userPda, rewardMint);
|
|
1987
1988
|
}
|
|
1988
1989
|
else {
|
|
1989
|
-
this.ix.keys[5].pubkey = util.generateAta(this.userPda,
|
|
1990
|
+
this.ix.keys[5].pubkey = util.generateAta(this.userPda, rewardMint, mintInfo.info.owner);
|
|
1990
1991
|
}
|
|
1991
1992
|
let binArrayLower = this.ix.keys[10].pubkey;
|
|
1992
1993
|
let binArrayUpper = this.ix.keys.length > 11 ? this.ix.keys[11].pubkey : this.ix.keys[10].pubkey;
|