return new mango account instance from reload

This commit is contained in:
tjs 2022-09-02 18:47:09 -04:00
parent 3f456393a5
commit c359ce26a7
1 changed files with 4 additions and 3 deletions

View File

@ -80,9 +80,10 @@ export class MangoAccount {
}
async reload(client: MangoClient, group: Group): Promise<MangoAccount> {
Object.assign(this, await client.getMangoAccount(this));
await this.reloadAccountData(client, group);
return this;
const mangoAccount = await client.getMangoAccount(this);
await mangoAccount.reloadAccountData(client, group);
Object.assign(this, mangoAccount);
return mangoAccount;
}
async reloadAccountData(