Skip to content

Commit

Permalink
Expose payer in init instructions + bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Giannis Chatziveroglou committed Jun 16, 2022
1 parent aed2598 commit c65204d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 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": "1.4.7",
"version": "1.4.8",
"description": "Cardinal token manager SDK",
"keywords": [
"solana",
Expand Down
5 changes: 3 additions & 2 deletions src/programs/timeInvalidator/instruction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export const init = async (
connection: Connection,
wallet: Wallet,
tokenManagerId: PublicKey,
timeInvalidation: TimeInvalidationParams
timeInvalidation: TimeInvalidationParams,
payer?: PublicKey
): Promise<[TransactionInstruction, PublicKey]> => {
const provider = new AnchorProvider(connection, wallet, {});

Expand Down Expand Up @@ -91,7 +92,7 @@ export const init = async (
tokenManager: tokenManagerId,
timeInvalidator: timeInvalidatorId,
issuer: wallet.publicKey,
payer: wallet.publicKey,
payer: payer || wallet.publicKey,
systemProgram: SystemProgram.programId,
},
}
Expand Down
5 changes: 3 additions & 2 deletions src/programs/tokenManager/instruction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export const init = async (
amount: BN,
kind: TokenManagerKind,
invalidationType: InvalidationType,
numInvalidators = 1
numInvalidators = 1,
payer?: PublicKey
): Promise<[TransactionInstruction, PublicKey]> => {
const provider = new AnchorProvider(connection, wallet, {});
const tokenManagerProgram = new Program<TOKEN_MANAGER_PROGRAM>(
Expand Down Expand Up @@ -91,7 +92,7 @@ export const init = async (
mintCounter: mintCounterId,
mint: mint,
issuer: wallet.publicKey,
payer: wallet.publicKey,
payer: payer || wallet.publicKey,
issuerTokenAccount: issuerTokenAccountId,
systemProgram: SystemProgram.programId,
},
Expand Down

0 comments on commit c65204d

Please sign in to comment.