From 048484398a4626f2c4e5617bb15e7898c0dc1445 Mon Sep 17 00:00:00 2001 From: Tommy Johnson Date: Sat, 5 Oct 2024 12:47:31 -0400 Subject: [PATCH 1/2] Allow wrapper program to be passed down from getClientForMarket --- client/ts/src/client.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/client/ts/src/client.ts b/client/ts/src/client.ts index 2621ab2b6..020c9b338 100644 --- a/client/ts/src/client.ts +++ b/client/ts/src/client.ts @@ -144,6 +144,7 @@ export class ManifestClient { connection: Connection, marketPk: PublicKey, payerKeypair: Keypair, + wrapperProgram: PublicKey, ): Promise { const marketObject: Market = await Market.loadFromAddress({ connection: connection, @@ -176,12 +177,15 @@ export class ManifestClient { owner: payerKeypair.publicKey, wrapperState: wrapperKeypair.publicKey, }); - const claimSeatIx: TransactionInstruction = createClaimSeatInstruction({ - manifestProgram: MANIFEST_PROGRAM_ID, - owner: payerKeypair.publicKey, - market: marketPk, - wrapperState: wrapperKeypair.publicKey, - }); + const claimSeatIx: TransactionInstruction = createClaimSeatInstruction( + { + manifestProgram: MANIFEST_PROGRAM_ID, + owner: payerKeypair.publicKey, + market: marketPk, + wrapperState: wrapperKeypair.publicKey, + }, + wrapperProgram, + ); transaction.add(createAccountIx); transaction.add(createWrapperIx); transaction.add(claimSeatIx); From e3b726ee6a937e3f5431b8e457f5d2595facdf67 Mon Sep 17 00:00:00 2001 From: Tommy Johnson Date: Sat, 5 Oct 2024 12:48:40 -0400 Subject: [PATCH 2/2] add param doc --- client/ts/src/client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/client/ts/src/client.ts b/client/ts/src/client.ts index 020c9b338..ac30abc1c 100644 --- a/client/ts/src/client.ts +++ b/client/ts/src/client.ts @@ -137,6 +137,7 @@ export class ManifestClient { * @param connection Connection * @param marketPk PublicKey of the market * @param payerKeypair Keypair of the trader + * @param wrapperProgram PublicKey of wrapper program to use if payer doesn't have a userWrapper * * @returns ManifestClient */