Don't reload openorders if there's no active markets
This commit is contained in:
parent
535b0b2d0c
commit
789a5135ac
|
@ -115,6 +115,7 @@ export class MangoAccount {
|
||||||
|
|
||||||
async reloadSerum3OpenOrders(client: MangoClient): Promise<MangoAccount> {
|
async reloadSerum3OpenOrders(client: MangoClient): Promise<MangoAccount> {
|
||||||
const serum3Active = this.serum3Active();
|
const serum3Active = this.serum3Active();
|
||||||
|
if (!serum3Active.length) return this;
|
||||||
const ais =
|
const ais =
|
||||||
await client.program.provider.connection.getMultipleAccountsInfo(
|
await client.program.provider.connection.getMultipleAccountsInfo(
|
||||||
serum3Active.map((serum3) => serum3.openOrders),
|
serum3Active.map((serum3) => serum3.openOrders),
|
||||||
|
|
Loading…
Reference in New Issue