ts client: Fix serum3DeregisterMarket
The indexReservation arg wasn't passed.
This commit is contained in:
parent
6399e6cb6c
commit
8c91541d12
|
@ -945,11 +945,19 @@ export class MangoClient {
|
||||||
externalMarketPk.toBase58(),
|
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
|
return await this.program.methods
|
||||||
.serum3DeregisterMarket()
|
.serum3DeregisterMarket()
|
||||||
.accounts({
|
.accounts({
|
||||||
group: group.publicKey,
|
group: group.publicKey,
|
||||||
serumMarket: serum3Market.publicKey,
|
serumMarket: serum3Market.publicKey,
|
||||||
|
indexReservation,
|
||||||
solDestination: (this.program.provider as AnchorProvider).wallet
|
solDestination: (this.program.provider as AnchorProvider).wallet
|
||||||
.publicKey,
|
.publicKey,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue