Skip to content

Commit

Permalink
Pop token metadata program
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbogle committed Feb 15, 2023
1 parent e3ff8a0 commit 2cb1731
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cardinal/token-manager",
"version": "4.3.1",
"version": "4.3.2-beta.1",
"description": "Cardinal token manager SDK",
"keywords": [
"solana",
Expand Down
2 changes: 1 addition & 1 deletion programs/cardinal-token-manager/src/instructions/claim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ pub fn handler<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts,
let associated_token_program_info = next_account_info(remaining_accs)?;
let authorization_rules_program_info = next_account_info(remaining_accs)?;
let authorization_rules_info = next_account_info(remaining_accs)?;
let _token_metadata_program = next_account_info(remaining_accs)?;
invoke_signed(
&Instruction {
program_id: mpl_token_metadata::id(),
Expand Down Expand Up @@ -328,7 +329,6 @@ pub fn handler<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts,
mint_info.to_account_info(),
ctx.accounts.recipient_token_account.to_account_info(),
ctx.accounts.recipient.to_account_info(),
ctx.accounts.recipient.to_account_info(),
ctx.accounts.system_program.to_account_info(),
sysvar_instructions_info.to_account_info(),
ctx.accounts.token_program.to_account_info(),
Expand Down
14 changes: 8 additions & 6 deletions src/programs/tokenManager/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -662,12 +662,14 @@ export const getRemainingAccountsForClaim = (
)
);
}
return claimReceiptId
? [
...remainingAccounts,
{ pubkey: claimReceiptId, isSigner: false, isWritable: true },
]
: remainingAccounts;
if (claimReceiptId) {
remainingAccounts.push({
pubkey: claimReceiptId,
isSigner: false,
isWritable: true,
});
}
return remainingAccounts;
};

export function findTokenRecordId(
Expand Down
4 changes: 2 additions & 2 deletions src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ export const withClaimToken = async (
) {
transaction.add(
ComputeBudgetProgram.setComputeUnitLimit({
units: 400000,
units: 1000000,
})
);
}
Expand Down Expand Up @@ -781,7 +781,7 @@ export const withInvalidate = async (
) {
transaction.add(
ComputeBudgetProgram.setComputeUnitLimit({
units: 400000,
units: 1000000,
})
);
}
Expand Down

0 comments on commit 2cb1731

Please sign in to comment.