From 789a5135aceb541099fcdec9185bb40cdece500f Mon Sep 17 00:00:00 2001 From: Riordan Panayides Date: Mon, 3 Apr 2023 20:07:00 +0100 Subject: [PATCH] Don't reload openorders if there's no active markets --- ts/client/src/accounts/mangoAccount.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ts/client/src/accounts/mangoAccount.ts b/ts/client/src/accounts/mangoAccount.ts index c863a5788..8d076d56c 100644 --- a/ts/client/src/accounts/mangoAccount.ts +++ b/ts/client/src/accounts/mangoAccount.ts @@ -115,6 +115,7 @@ export class MangoAccount { async reloadSerum3OpenOrders(client: MangoClient): Promise { const serum3Active = this.serum3Active(); + if (!serum3Active.length) return this; const ais = await client.program.provider.connection.getMultipleAccountsInfo( serum3Active.map((serum3) => serum3.openOrders),