@@ -198,7 +198,6 @@ export abstract class BaseWebsocketClient<
198198 reconnectTimeout : 500 ,
199199 recvWindow : 0 ,
200200
201- // TODO: what's the setting for these on bitmart?
202201 // Requires a confirmation "response" from the ws connection before assuming it is ready
203202 requireConnectionReadyConfirmation : false ,
204203
@@ -210,7 +209,7 @@ export abstract class BaseWebsocketClient<
210209 authPrivateRequests : false ,
211210
212211 // Automatically re-auth WS API, if we were auth'd before and get reconnected
213- reauthWSAPIOnReconnect : true , // TODO: not in use?
212+ reauthWSAPIOnReconnect : true ,
214213
215214 // Whether to use native heartbeats (depends on the exchange)
216215 useNativeHeartbeats : false ,
@@ -287,23 +286,6 @@ export abstract class BaseWebsocketClient<
287286 wsKey : TWSKey ,
288287 ) : Promise < MidflightWsRequestEvent < TWSRequestEvent > [ ] > ;
289288
290- // TODO: deprecate these two
291- // /**
292- // * Returns a list of string events that can be individually sent upstream to complete subscribing to these topics
293- // */
294- // protected abstract getWsSubscribeEventsForTopics(
295- // topics: WsTopic[],
296- // wsKey: TWSKey,
297- // ): string[];
298-
299- // /**
300- // * Returns a list of string events that can be individually sent upstream to complete unsubscribing to these topics
301- // */
302- // protected abstract getWsUnsubscribeEventsForTopics(
303- // topics: WsTopic[],
304- // wsKey: TWSKey,
305- // ): string[];
306-
307289 /**
308290 * Abstraction called to sort ws events into emittable event types (response to a request, data update, etc)
309291 */
@@ -317,10 +299,6 @@ export abstract class BaseWebsocketClient<
317299 */
318300 abstract connectAll ( ) : Promise < WSConnectedResult | undefined > [ ] ;
319301
320- protected isPrivateWsKey ( wsKey : TWSKey ) : boolean {
321- return this . getPrivateWSKeys ( ) . includes ( wsKey ) ;
322- }
323-
324302 /** Returns auto-incrementing request ID, used to track promise references for async requests */
325303 protected getNewRequestId ( ) : number {
326304 return ++ this . wsApiRequestId ;
@@ -388,7 +366,7 @@ export abstract class BaseWebsocketClient<
388366 }
389367
390368 // We're connected. Check if auth is needed and if already authenticated
391- const isPrivateConnection = this . isPrivateWsKey ( wsKey ) ;
369+ const isPrivateConnection = this . isAuthOnConnectWsKey ( wsKey ) ;
392370 const isAuthenticated = this . wsStore . get ( wsKey ) ?. isAuthenticated ;
393371 if ( isPrivateConnection && ! isAuthenticated ) {
394372 /**
@@ -429,7 +407,7 @@ export abstract class BaseWebsocketClient<
429407 }
430408
431409 // We're connected. Check if auth is needed and if already authenticated
432- const isPrivateConnection = this . isPrivateWsKey ( wsKey ) ;
410+ const isPrivateConnection = this . isAuthOnConnectWsKey ( wsKey ) ;
433411 const isAuthenticated = this . wsStore . get ( wsKey ) ?. isAuthenticated ;
434412 if ( isPrivateConnection && ! isAuthenticated ) {
435413 /**
@@ -1080,7 +1058,7 @@ export abstract class BaseWebsocketClient<
10801058
10811059 // Some websockets require an auth packet to be sent after opening the connection
10821060 if (
1083- this . isAuthOnConnectWsKey ( wsKey ) && // same as isPrivateWsKey << deprecate isPrivateWsKey TODO:
1061+ this . isAuthOnConnectWsKey ( wsKey ) &&
10841062 this . authPrivateConnectionsOnConnect ( wsKey )
10851063 ) {
10861064 await this . assertIsAuthenticated ( wsKey ) ;
0 commit comments