Another bugfix related to the mempool transaction subscription.
This commit is contained in:
		
							parent
							
								
									590f1d2b04
								
							
						
					
					
						commit
						e02924e8dd
					
				@ -56,7 +56,7 @@ export class TransactionComponent implements OnInit, OnDestroy {
 | 
			
		||||
          ),
 | 
			
		||||
        );
 | 
			
		||||
      }),
 | 
			
		||||
      flatMap(() => {
 | 
			
		||||
      switchMap(() => {
 | 
			
		||||
        let transactionObservable$: Observable<Transaction>;
 | 
			
		||||
        if (history.state.data) {
 | 
			
		||||
          transactionObservable$ = of(history.state.data);
 | 
			
		||||
 | 
			
		||||
@ -129,6 +129,9 @@ export class WebsocketService {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  startTrackTransaction(txId: string) {
 | 
			
		||||
    if (this.isTrackingTx) {
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
    this.websocketSubject.next({ 'track-tx': txId });
 | 
			
		||||
    this.isTrackingTx = true;
 | 
			
		||||
  }
 | 
			
		||||
@ -139,7 +142,7 @@ export class WebsocketService {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  stopTrackingTransaction() {
 | 
			
		||||
    if (this.isTrackingTx === false) {
 | 
			
		||||
    if (!this.isTrackingTx) {
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
    this.websocketSubject.next({ 'track-tx': 'stop' });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user