Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions client/ts/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,15 @@ 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
*/
public static async getClientForMarket(
connection: Connection,
marketPk: PublicKey,
payerKeypair: Keypair,
wrapperProgram: PublicKey,
): Promise<ManifestClient> {
const marketObject: Market = await Market.loadFromAddress({
connection: connection,
Expand Down Expand Up @@ -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);
Expand Down