@@ -65,9 +65,9 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
6565 this . _rpcCore . setRegistrySwap ( ( blockHash : Uint8Array ) => this . getBlockRegistry ( blockHash ) ) ;
6666
6767 if ( this . hasSubscriptions ) {
68- this . _rpcCore . provider . on ( 'disconnected' , this . #onProviderDisconnect) ;
69- this . _rpcCore . provider . on ( 'error' , this . #onProviderError) ;
70- this . _rpcCore . provider . on ( 'connected' , this . #onProviderConnect) ;
68+ this . _rpcCore . provider . on ( 'disconnected' , ( ) => this . #onProviderDisconnect( ) ) ;
69+ this . _rpcCore . provider . on ( 'error' , ( e : Error ) => this . #onProviderError( e ) ) ;
70+ this . _rpcCore . provider . on ( 'connected' , ( ) => this . #onProviderConnect( ) ) ;
7171 } else {
7272 l . warn ( 'Api will be available in a limited mode since the provider does not support subscriptions' ) ;
7373 }
@@ -380,7 +380,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
380380 this . _unsubscribeUpdates ( ) ;
381381 }
382382
383- #onProviderConnect = async ( ) : Promise < void > = > {
383+ async #onProviderConnect ( ) : Promise < void > {
384384 this . _isConnected . next ( true ) ;
385385 this . emit ( 'connected' ) ;
386386
@@ -406,15 +406,15 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
406406
407407 this . emit ( 'error' , error ) ;
408408 }
409- } ;
409+ }
410410
411- #onProviderDisconnect = ( ) : void => {
411+ #onProviderDisconnect ( ) : void {
412412 this . _isConnected . next ( false ) ;
413413 this . _unsubscribeHealth ( ) ;
414414 this . emit ( 'disconnected' ) ;
415- } ;
415+ }
416416
417- #onProviderError = ( error : Error ) : void => {
417+ #onProviderError ( error : Error ) : void {
418418 this . emit ( 'error' , error ) ;
419- } ;
419+ }
420420}
0 commit comments