@@ -27,8 +27,6 @@ import { sendSentryEvent } from '@shared/helpers/webnode.helper';
2727import { DashboardPeerStatus } from '@shared/types/dashboard/dashboard.peer' ;
2828import { FileProgressHelper } from '@core/helpers/file-progress.helper' ;
2929import { CONFIG } from '@shared/constants/config' ;
30- import firebase from 'firebase/compat' ;
31- import { FirestoreService } from '@core/services/firestore.service' ;
3230import { SentryService } from '@core/services/sentry.service' ;
3331
3432export interface PrivateStake {
@@ -60,7 +58,6 @@ export class WebNodeService {
6058
6159 constructor (
6260 private http : HttpClient ,
63- private firestore : FirestoreService ,
6461 private sentryService : SentryService ,
6562 ) {
6663 FileProgressHelper . initDownloadProgress ( ) ;
@@ -191,15 +188,6 @@ export class WebNodeService {
191188 sendSentryEvent ( 'WebNode failed to start: ' + error . message ) ;
192189 return throwError ( ( ) => new Error ( error . message ) ) ;
193190 } ) ,
194- switchMap ( ( ) => this . webnode$ . asObservable ( ) ) ,
195- filter ( ( ) => CONFIG . globalConfig . heartbeats ) ,
196- switchMap ( ( ) => timer ( 0 , 60000 ) ) ,
197- switchMap ( ( ) => this . heartBeat$ ) ,
198- switchMap ( heartBeat => this . firestore . addHeartbeat ( heartBeat ) ) ,
199- catchError ( error => {
200- console . log ( 'Error from heartbeat api:' , error ) ;
201- return of ( null ) ;
202- } ) ,
203191 ) ;
204192 }
205193 return EMPTY ;
@@ -301,13 +289,6 @@ export class WebNodeService {
301289 ) ;
302290 }
303291
304- get heartBeat$ ( ) : Observable < any > {
305- return this . webnode$ . asObservable ( ) . pipe (
306- filter ( Boolean ) ,
307- switchMap ( webnode => from ( webnode . make_heartbeat ( ) ) ) ,
308- ) ;
309- }
310-
311292 actions$ ( path : string ) : Observable < any > {
312293 let slot : string | number = path . split ( '?id=' ) [ 1 ] ;
313294 if ( ! isNaN ( Number ( slot ) ) ) {
0 commit comments