Don't reload openorders if there's no active markets

This commit is contained in:
Riordan Panayides 2023-04-03 20:07:00 +01:00
parent 535b0b2d0c
commit 789a5135ac
1 changed files with 1 additions and 0 deletions

View File

@ -115,6 +115,7 @@ export class MangoAccount {
async reloadSerum3OpenOrders(client: MangoClient): Promise<MangoAccount> {
const serum3Active = this.serum3Active();
if (!serum3Active.length) return this;
const ais =
await client.program.provider.connection.getMultipleAccountsInfo(
serum3Active.map((serum3) => serum3.openOrders),