diff --git a/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.html b/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.html index 9ae0ddade..98095aa07 100644 --- a/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.html +++ b/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.html @@ -29,7 +29,7 @@
-
Out-of-band Fees Per Block
+
Total Bid Boost
diff --git a/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts b/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts index d27b10690..4460bffe4 100644 --- a/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts +++ b/frontend/src/app/components/acceleration/acceleration-fees-graph/acceleration-fees-graph.component.ts @@ -81,7 +81,7 @@ export class AccelerationFeesGraphComponent implements OnInit, OnDestroy { }), map(([accelerations, blockFeesResponse]) => { return { - avgFeesPaid: accelerations.filter(acc => acc.status === 'completed').reduce((total, acc) => total + acc.feePaid, 0) / accelerations.length + avgFeesPaid: accelerations.filter(acc => acc.status === 'completed').reduce((total, acc) => total + (acc.feePaid - acc.baseFee - acc.vsizeFee), 0) / accelerations.length }; }), ); @@ -151,7 +151,7 @@ export class AccelerationFeesGraphComponent implements OnInit, OnDestroy { while (last <= val.avgHeight) { blockCount++; totalFeeDelta += (blockAccelerations[last] || []).reduce((total, acc) => total + acc.feeDelta, 0); - totalFeePaid += (blockAccelerations[last] || []).reduce((total, acc) => total + acc.feePaid, 0); + totalFeePaid += (blockAccelerations[last] || []).reduce((total, acc) => total + (acc.feePaid - acc.baseFee - acc.vsizeFee), 0); totalCount += (blockAccelerations[last] || []).length; last++; } @@ -246,7 +246,7 @@ export class AccelerationFeesGraphComponent implements OnInit, OnDestroy { icon: 'roundRect', }, { - name: 'Out-of-band fees per block', + name: 'Total bid boost per block', inactiveColor: 'rgb(110, 112, 121)', textStyle: { color: 'white', @@ -256,7 +256,7 @@ export class AccelerationFeesGraphComponent implements OnInit, OnDestroy { ], selected: { 'In-band fees per block': false, - 'Out-of-band fees per block': true, + 'Total bid boost per block': true, }, show: !this.widget, }, @@ -299,7 +299,7 @@ export class AccelerationFeesGraphComponent implements OnInit, OnDestroy { { legendHoverLink: false, zlevel: 1, - name: 'Out-of-band fees per block', + name: 'Total bid boost per block', data: data.map(block => [block.timestamp * 1000, block.avgFeePaid, block.avgHeight]), stack: 'Total', type: 'bar', diff --git a/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.html b/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.html index 21cd57ae0..9cdd6d70b 100644 --- a/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.html +++ b/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.html @@ -1,14 +1,14 @@
-
Transactions
+
Requests
{{ stats.count }}
accelerated
-
Out-of-band Fees
+
Total Bid Boost
{{ stats.totalFeesPaid / 100_000_000 | amountShortener: 4 }} BTC
@@ -29,14 +29,14 @@
-
Transactions
+
Requests
-
Out-of-band Fees
+
Total Bid Boost
diff --git a/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.ts b/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.ts index d83303619..0a6ef065c 100644 --- a/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.ts +++ b/frontend/src/app/components/acceleration/acceleration-stats/acceleration-stats.component.ts @@ -27,11 +27,11 @@ export class AccelerationStatsComponent implements OnInit { let totalFeesPaid = 0; let totalSucceeded = 0; let totalCanceled = 0; - for (const acceleration of accelerations) { - if (acceleration.status === 'completed') { + for (const acc of accelerations) { + if (acc.status === 'completed') { totalSucceeded++; - totalFeesPaid += acceleration.feePaid || 0; - } else if (acceleration.status === 'failed') { + totalFeesPaid += (acc.feePaid - acc.baseFee - acc.vsizeFee) || 0; + } else if (acc.status === 'failed') { totalCanceled++; } } diff --git a/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.html b/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.html index f2265282f..9a919ca54 100644 --- a/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.html +++ b/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.html @@ -14,7 +14,7 @@ Requested - Out-of-band Fee + Bid Boost Block Status @@ -39,7 +39,7 @@ - {{ (acceleration.feePaid) | number }} sat + {{ (acceleration.boost) | number }} sat ~ @@ -48,7 +48,7 @@ {{ acceleration.blockHeight }} - Pending + Pending Mined Canceled diff --git a/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.ts b/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.ts index ddd89d31c..69af8b966 100644 --- a/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.ts +++ b/frontend/src/app/components/acceleration/accelerations-list/accelerations-list.component.ts @@ -49,6 +49,9 @@ export class AccelerationsListComponent implements OnInit { acceleration.status = acceleration.status || 'accelerating'; } } + for (const acc of accelerations) { + acc.boost = acc.feePaid - acc.baseFee - acc.vsizeFee; + } if (this.widget) { return of(accelerations.slice(-6).reverse()); } else { diff --git a/frontend/src/app/components/acceleration/pending-stats/pending-stats.component.html b/frontend/src/app/components/acceleration/pending-stats/pending-stats.component.html index c94bbf43a..1b1a2c381 100644 --- a/frontend/src/app/components/acceleration/pending-stats/pending-stats.component.html +++ b/frontend/src/app/components/acceleration/pending-stats/pending-stats.component.html @@ -1,10 +1,10 @@
-
Transactions
+
Requests
{{ stats.count }}
-
accelerated
+
pending
@@ -29,7 +29,7 @@
-
Transactions
+
Requests
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 8ac4cf919..9ad939deb 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -529,7 +529,7 @@ Effective fee rate
- + diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index 409ba33ff..883a3fa7f 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -255,7 +255,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { ).subscribe((accelerationHistory) => { for (const acceleration of accelerationHistory) { if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'mined') && acceleration.feePaid > 0) { - acceleration.actualFeeDelta = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + acceleration.feePaid - acceleration.baseFee - acceleration.vsizeFee); + acceleration.acceleratedFee = Math.max(acceleration.effectiveFee, acceleration.effectiveFee + acceleration.feePaid - acceleration.baseFee - acceleration.vsizeFee); this.accelerationInfo = acceleration; } } diff --git a/frontend/src/app/interfaces/node-api.interface.ts b/frontend/src/app/interfaces/node-api.interface.ts index 31b9a6de8..9d936722d 100644 --- a/frontend/src/app/interfaces/node-api.interface.ts +++ b/frontend/src/app/interfaces/node-api.interface.ts @@ -342,7 +342,8 @@ export interface Acceleration { blockHash: string; blockHeight: number; - actualFeeDelta?: number; + acceleratedFee?: number; + boost?: number; } export interface AccelerationHistoryParams {