Merge pull request #531 from blockworks-foundation/pan/fix-reload-oos

Don't reload OpenOrders if there's no active markets
This commit is contained in:
tlrsssss 2023-04-03 15:25:14 -04:00 committed by GitHub
commit 268ccfd03c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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),