return new mango account instance from reload
This commit is contained in:
parent
3f456393a5
commit
c359ce26a7
|
@ -80,9 +80,10 @@ export class MangoAccount {
|
||||||
}
|
}
|
||||||
|
|
||||||
async reload(client: MangoClient, group: Group): Promise<MangoAccount> {
|
async reload(client: MangoClient, group: Group): Promise<MangoAccount> {
|
||||||
Object.assign(this, await client.getMangoAccount(this));
|
const mangoAccount = await client.getMangoAccount(this);
|
||||||
await this.reloadAccountData(client, group);
|
await mangoAccount.reloadAccountData(client, group);
|
||||||
return this;
|
Object.assign(this, mangoAccount);
|
||||||
|
return mangoAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
async reloadAccountData(
|
async reloadAccountData(
|
||||||
|
|
Loading…
Reference in New Issue