Skip to content

Commit

Permalink
ts client: add sequence check instruction (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnyser committed Mar 7, 2024
1 parent 5fc7294 commit 7057da9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ts/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1034,20 +1034,18 @@ export class MangoClient {
return await this.sendAndConfirmTransactionForGroup(group, [ix]);
}

public async sequenceCheck(
public async sequenceCheckIx(
group: Group,
mangoAccount: MangoAccount,
): Promise<MangoSignatureStatus> {
const ix = await this.program.methods
): Promise<TransactionInstruction> {
return await this.program.methods
.sequenceCheck(mangoAccount.sequenceNumber)
.accounts({
group: group.publicKey,
account: mangoAccount.publicKey,
owner: (this.program.provider as AnchorProvider).wallet.publicKey,
})
.instruction();

return await this.sendAndConfirmTransactionForGroup(group, [ix]);
}

public async getMangoAccount(
Expand Down

0 comments on commit 7057da9

Please sign in to comment.