diff --git a/client/ts/src/client.ts b/client/ts/src/client.ts index 2621ab2b6..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 */ @@ -144,6 +145,7 @@ export class ManifestClient { connection: Connection, marketPk: PublicKey, payerKeypair: Keypair, + wrapperProgram: PublicKey, ): Promise { const marketObject: Market = await Market.loadFromAddress({ connection: connection, @@ -176,12 +178,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);