Don't show Accelerated on tx just mined by non-participating pool
This commit is contained in:
		
							parent
							
								
									4470461a98
								
							
						
					
					
						commit
						bbff50527b
					
				@ -132,6 +132,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
 | 
				
			|||||||
  tooltipPosition: { x: number, y: number };
 | 
					  tooltipPosition: { x: number, y: number };
 | 
				
			||||||
  isMobile: boolean;
 | 
					  isMobile: boolean;
 | 
				
			||||||
  firstLoad = true;
 | 
					  firstLoad = true;
 | 
				
			||||||
 | 
					  waitingForAccelerationInfo: boolean = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  featuresEnabled: boolean;
 | 
					  featuresEnabled: boolean;
 | 
				
			||||||
  segwitEnabled: boolean;
 | 
					  segwitEnabled: boolean;
 | 
				
			||||||
@ -338,6 +339,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
 | 
				
			|||||||
          acceleration.boost = boostCost;
 | 
					          acceleration.boost = boostCost;
 | 
				
			||||||
          this.tx.acceleratedAt = acceleration.added;
 | 
					          this.tx.acceleratedAt = acceleration.added;
 | 
				
			||||||
          this.accelerationInfo = acceleration;
 | 
					          this.accelerationInfo = acceleration;
 | 
				
			||||||
 | 
					          this.waitingForAccelerationInfo = false;
 | 
				
			||||||
          this.setIsAccelerated();
 | 
					          this.setIsAccelerated();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -616,6 +618,9 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    this.stateService.txConfirmed$.subscribe(([txConfirmed, block]) => {
 | 
					    this.stateService.txConfirmed$.subscribe(([txConfirmed, block]) => {
 | 
				
			||||||
      if (txConfirmed && this.tx && !this.tx.status.confirmed && txConfirmed === this.tx.txid) {
 | 
					      if (txConfirmed && this.tx && !this.tx.status.confirmed && txConfirmed === this.tx.txid) {
 | 
				
			||||||
 | 
					        if (this.tx.acceleration) {
 | 
				
			||||||
 | 
					          this.waitingForAccelerationInfo = true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        this.tx.status = {
 | 
					        this.tx.status = {
 | 
				
			||||||
          confirmed: true,
 | 
					          confirmed: true,
 | 
				
			||||||
          block_height: block.height,
 | 
					          block_height: block.height,
 | 
				
			||||||
@ -812,7 +817,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  setIsAccelerated(initialState: boolean = false) {
 | 
					  setIsAccelerated(initialState: boolean = false) {
 | 
				
			||||||
    this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
 | 
					    this.isAcceleration = ((this.tx.acceleration && (!this.tx.status.confirmed || this.waitingForAccelerationInfo)) || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
 | 
				
			||||||
    if (this.isAcceleration) {
 | 
					    if (this.isAcceleration) {
 | 
				
			||||||
      if (initialState) {
 | 
					      if (initialState) {
 | 
				
			||||||
        this.accelerationFlowCompleted = true;
 | 
					        this.accelerationFlowCompleted = true;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user