From 8fea9dd91ebe7c15112e2e56754b8e21eb818430 Mon Sep 17 00:00:00 2001 From: 0xbridges Date: Sun, 17 Dec 2023 01:35:22 +0400 Subject: [PATCH 1/2] fixed wrong parameter passed for delegateAccount in createOpenOrders function --- ts/client/src/client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index 528745413..817964cfa 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -452,7 +452,7 @@ export class OpenBookV2Client { name: string, owner: PublicKey = this.walletPk, delegateAccount: PublicKey | null, - openOrdersIndexer?: PublicKey, + openOrdersIndexer?: PublicKey | null, ): Promise<[TransactionInstruction[], PublicKey]> { const ixs: TransactionInstruction[] = []; @@ -517,6 +517,7 @@ export class OpenBookV2Client { accountIndex, name, owner.publicKey, + null, openOrdersIndexer, ); const additionalSigners = [payer]; From 29f10753967d021d5bcc4f534a0bacf0b8f515f6 Mon Sep 17 00:00:00 2001 From: 0xbridges Date: Sun, 17 Dec 2023 01:48:11 +0400 Subject: [PATCH 2/2] add delegateAccount in createOpenOrders function --- ts/client/src/client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index 817964cfa..75dec99fe 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -452,7 +452,7 @@ export class OpenBookV2Client { name: string, owner: PublicKey = this.walletPk, delegateAccount: PublicKey | null, - openOrdersIndexer?: PublicKey | null, + openOrdersIndexer?: PublicKey, ): Promise<[TransactionInstruction[], PublicKey]> { const ixs: TransactionInstruction[] = []; @@ -510,6 +510,7 @@ export class OpenBookV2Client { accountIndex: BN, name: string, owner: Keypair = payer, + delegateAccount: PublicKey | null = null, openOrdersIndexer: PublicKey | null = null, ): Promise { const [ixs, openOrdersAccount] = await this.createOpenOrdersInstruction( @@ -517,7 +518,7 @@ export class OpenBookV2Client { accountIndex, name, owner.publicKey, - null, + delegateAccount, openOrdersIndexer, ); const additionalSigners = [payer];