clear feeDelta if a tx is mined by non-participating pool

This commit is contained in:
natsoni 2024-08-18 18:33:25 +02:00
parent 72bb92dd8b
commit b3ac107b0b
No known key found for this signature in database
GPG Key ID: C65917583181743B

View File

@ -359,12 +359,16 @@ 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) { if (acceleration.txid === this.txId) {
if ((acceleration.status === 'completed' || acceleration.status === 'completed_provisional') && acceleration.pools.includes(acceleration.minedByPoolUniqueId)) { if (acceleration.status === 'completed' || acceleration.status === 'completed_provisional') {
const boostCost = acceleration.boostCost || acceleration.bidBoost; if (acceleration.pools.includes(acceleration.minedByPoolUniqueId)) {
acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize; const boostCost = acceleration.boostCost || acceleration.bidBoost;
acceleration.boost = boostCost; acceleration.acceleratedFeeRate = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + boostCost) / acceleration.effectiveVsize;
this.tx.acceleratedAt = acceleration.added; acceleration.boost = boostCost;
this.accelerationInfo = acceleration; this.tx.acceleratedAt = acceleration.added;
this.accelerationInfo = acceleration;
} else {
this.tx.feeDelta = undefined;
}
} }
this.waitingForAccelerationInfo = false; this.waitingForAccelerationInfo = false;
this.setIsAccelerated(); this.setIsAccelerated();