Fix accelerated fee rates
This commit is contained in:
		
							parent
							
								
									91a8a8be34
								
							
						
					
					
						commit
						5e07e9dceb
					
				@ -613,8 +613,8 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        <td>
 | 
					        <td>
 | 
				
			||||||
          <div class="effective-fee-container">
 | 
					          <div class="effective-fee-container">
 | 
				
			||||||
            @if (accelerationInfo) {
 | 
					            @if (accelerationInfo && (accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize)) {
 | 
				
			||||||
              <app-fee-rate [fee]="accelerationInfo.acceleratedFee" [weight]="accelerationInfo.effectiveVsize * 4"></app-fee-rate>
 | 
					              <app-fee-rate [fee]="accelerationInfo.acceleratedFeeRate"></app-fee-rate>
 | 
				
			||||||
            } @else {
 | 
					            } @else {
 | 
				
			||||||
              <app-fee-rate [fee]="tx.effectiveFeePerVsize"></app-fee-rate>
 | 
					              <app-fee-rate [fee]="tx.effectiveFeePerVsize"></app-fee-rate>
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
@ -290,7 +290,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
 | 
				
			|||||||
    ).subscribe((accelerationHistory) => {
 | 
					    ).subscribe((accelerationHistory) => {
 | 
				
			||||||
      for (const acceleration of accelerationHistory) {
 | 
					      for (const acceleration of accelerationHistory) {
 | 
				
			||||||
        if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'completed_provisional')) {
 | 
					        if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'completed_provisional')) {
 | 
				
			||||||
          acceleration.acceleratedFee = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + acceleration.feePaid - acceleration.baseFee - acceleration.vsizeFee);
 | 
					          acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + acceleration.feePaid - acceleration.baseFee - acceleration.vsizeFee) / acceleration.effectiveVsize;
 | 
				
			||||||
          this.accelerationInfo = acceleration;
 | 
					          this.accelerationInfo = acceleration;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
@ -394,7 +394,7 @@ export interface Acceleration {
 | 
				
			|||||||
  blockHash: string;
 | 
					  blockHash: string;
 | 
				
			||||||
  blockHeight: number;
 | 
					  blockHeight: number;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  acceleratedFee?: number;
 | 
					  acceleratedFeeRate?: number;
 | 
				
			||||||
  boost?: number;
 | 
					  boost?: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user