use custom sendTransaction in closeMangoAccount

This commit is contained in:
tjs 2022-09-02 13:50:01 -04:00
parent 511db72f8e
commit 3f456393a5
1 changed files with 10 additions and 2 deletions

View File

@ -664,7 +664,7 @@ export class MangoClient {
group: Group,
mangoAccount: MangoAccount,
): Promise<TransactionSignature> {
return await this.program.methods
const transaction = await this.program.methods
.accountClose()
.accounts({
group: group.publicKey,
@ -672,7 +672,15 @@ export class MangoClient {
owner: (this.program.provider as AnchorProvider).wallet.publicKey,
solDestination: mangoAccount.owner,
})
.rpc();
.transaction();
return await sendTransaction(
this.program.provider as AnchorProvider,
transaction,
{
postSendTxCallback: this.postSendTxCallback,
},
);
}
public async computeAccountData(