From 22898491ab4ac0c8cc1654e478f9919c29106126 Mon Sep 17 00:00:00 2001 From: soundsonacid Date: Fri, 26 Jul 2024 16:40:32 -0500 Subject: [PATCH] pr comment --- sdk/src/openbook/openbookV2Subscriber.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/src/openbook/openbookV2Subscriber.ts b/sdk/src/openbook/openbookV2Subscriber.ts index d0d6eaf0e..3a439b417 100644 --- a/sdk/src/openbook/openbookV2Subscriber.ts +++ b/sdk/src/openbook/openbookV2Subscriber.ts @@ -67,15 +67,13 @@ export class OpenbookV2Subscriber implements L2OrderBookGenerator { if (this.subscriptionType === 'websocket') { this.marketCallbackId = this.connection.onAccountChange( this.marketAddress, - (accountInfo, _) => { + async (accountInfo, _) => { const marketRaw = openbookV2Program.coder.accounts.decode( 'Market', accountInfo.data ); this.market = new Market(this.client, this.marketAddress, marketRaw); - (async () => { - await this.market.loadOrderBook(); - })(); + await this.market.loadOrderBook(); } ); } else {