Merge pull request #4542 from mempool/mononaut/unsub-track-block
unsubscribe from mempool block tracking
This commit is contained in:
		
						commit
						6da4f34656
					
				@ -968,7 +968,7 @@ class WebsocketHandler {
 | 
				
			|||||||
        if (client['track-tx']) {
 | 
					        if (client['track-tx']) {
 | 
				
			||||||
          numTxSubs++;
 | 
					          numTxSubs++;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (client['track-mempool-block'] >= 0) {
 | 
					        if (client['track-mempool-block'] != null && client['track-mempool-block'] >= 0) {
 | 
				
			||||||
          numProjectedSubs++;
 | 
					          numProjectedSubs++;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (client['track-rbf']) {
 | 
					        if (client['track-rbf']) {
 | 
				
			||||||
 | 
				
			|||||||
@ -75,6 +75,7 @@ export class MempoolBlockComponent implements OnInit, OnDestroy {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  ngOnDestroy(): void {
 | 
					  ngOnDestroy(): void {
 | 
				
			||||||
    this.stateService.markBlock$.next({});
 | 
					    this.stateService.markBlock$.next({});
 | 
				
			||||||
 | 
					    this.websocketService.stopTrackMempoolBlock();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  getOrdinal(mempoolBlock: MempoolBlock): string {
 | 
					  getOrdinal(mempoolBlock: MempoolBlock): string {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user