From 8c91541d12f00af36a238f8d8eaedb3ba9db2dce Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 20 Sep 2022 11:41:15 +0200 Subject: [PATCH] ts client: Fix serum3DeregisterMarket The indexReservation arg wasn't passed. --- ts/client/src/client.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index ee7b28a86..0f384516c 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -945,11 +945,19 @@ export class MangoClient { externalMarketPk.toBase58(), )!; + const marketIndexBuf = Buffer.alloc(2); + marketIndexBuf.writeUInt16LE(serum3Market.marketIndex); + const [indexReservation] = await PublicKey.findProgramAddress( + [Buffer.from('Serum3Index'), group.publicKey.toBuffer(), marketIndexBuf], + this.program.programId, + ); + return await this.program.methods .serum3DeregisterMarket() .accounts({ group: group.publicKey, serumMarket: serum3Market.publicKey, + indexReservation, solDestination: (this.program.provider as AnchorProvider).wallet .publicKey, })