From 3e9765c09e70a8dac86db8839e0e7d252498f9d2 Mon Sep 17 00:00:00 2001 From: Britt Cyr Date: Mon, 5 Feb 2024 22:26:44 -0500 Subject: [PATCH 1/3] Do not allow penalty payer to be null --- ts/client/src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index 8ee2c0fe1..f6119bc6d 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -955,7 +955,7 @@ export class OpenBookV2Client { market: MarketAccount, userBaseAccount: PublicKey, userQuoteAccount: PublicKey, - referrerAccount: PublicKey | null, + referrerAccount: PublicKey, penaltyPayer: PublicKey | null, openOrdersDelegate?: Keypair, ): Promise<[TransactionInstruction, Signer[]]> { From a36a1e45af4f4f5fc81f6eff2d5a82fdcbb2e40b Mon Sep 17 00:00:00 2001 From: Britt Cyr Date: Tue, 6 Feb 2024 13:26:41 -0500 Subject: [PATCH 2/3] fix param --- ts/client/src/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index f6119bc6d..694204a70 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -955,8 +955,8 @@ export class OpenBookV2Client { market: MarketAccount, userBaseAccount: PublicKey, userQuoteAccount: PublicKey, - referrerAccount: PublicKey, - penaltyPayer: PublicKey | null, + referrerAccount: PublicKey | null, + penaltyPayer: PublicKey, openOrdersDelegate?: Keypair, ): Promise<[TransactionInstruction, Signer[]]> { const ix = await this.program.methods From 7ba8793ae0667ecd28b2a1728f012b88e86a025e Mon Sep 17 00:00:00 2001 From: Britt Cyr Date: Tue, 6 Feb 2024 13:42:19 -0500 Subject: [PATCH 3/3] Remove nullish --- ts/client/src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index 694204a70..f652c1f4c 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -973,7 +973,7 @@ export class OpenBookV2Client { userBaseAccount: userBaseAccount, userQuoteAccount: userQuoteAccount, referrerAccount: referrerAccount, - penaltyPayer: penaltyPayer ?? PublicKey.default, + penaltyPayer: penaltyPayer, }) .instruction();