-
-
{{ (estimate.txSummary.effectiveFee + minExtraCost * 2) / estimate.txSummary.effectiveVsize | number : '1.0-0' }} sat/vB
-
{{ (estimate.txSummary.effectiveFee + minExtraCost * 5) / estimate.txSummary.effectiveVsize | number : '1.0-0' }} sat/vB
-
{{ (estimate.txSummary.effectiveFee + minExtraCost * 10) / estimate.txSummary.effectiveVsize | number : '1.0-0' }} sat/vB
-
{{ (estimate.txSummary.effectiveFee + minExtraCost * 20) / estimate.txSummary.effectiveVsize | number : '1.0-0' }} sat/vB
+
+
+
+
+
+
+
+
+
+ Next block market price
+
+
+ {{ estimate.targetFeeRate | number : '1.0-0' }} sat/vB
+
+
+
+
+ Currently estimated fee to get into next block
+
+
+
+ {{ estimate.nextBlockFee| number }} sats
+
+
+
+
+
+
+
+
+ Fees paid in-band
+
+
+ ~ {{ (estimate.txSummary.effectiveFee / estimate.txSummary.effectiveVsize) | number : '1.0-0' }} sat/vB
+
+
+
+
+ What you already paid when you made the transaction
+
+
+
+ {{ estimate.txSummary.effectiveFee | number }} sats
+
+
+
+
+
+
+
+
+ Extra fee required
+
+
+ {{ math.max(0, estimate.nextBlockFee - estimate.txSummary.effectiveFee) | number }} sats
+
+
+
+
+
+ Difference between the next block fee and your tx fee
+
+
+
+
+
+
+
+
How much more are you willing to pay at most to get into the next block?
+
+
+
+ The maximum extra transaction fee you're willing to pay to get into the next block. If the next block market price becomes too expensive for you, we will automatically cancel your acceleration request. Final charged fee may be smaller based on the fee market.
+
+
-
-
- Acceleration summary
-
-
-
-
-
-
-
- Your maximum tx fees
-
-
- ~{{ ((estimate.txSummary.effectiveFee + userBid) / estimate.txSummary.effectiveVsize) | number : '1.0-0' }} sat/vB
-
-
-
-
- The maximum extra transaction fee you're willing to pay
-
-
-
- {{ userBid | number }} sats
-
-
-
-
-
-
-
-
- Mempool Acceleratorâ„¢ fee
-
-
- +{{ estimate.mempoolBaseFee + estimate.vsizeFee | number }} sats
-
-
-
-
-
- mempool.space fee
-
-
-
- {{ estimate.mempoolBaseFee | number }} sats
-
-
-
-
-
-
- Transaction vsize fee
-
-
-
- {{ estimate.vsizeFee | number }} sats
-
-
-
-
-
-
-
-
- Estimated acceleration cost
-
-
-
- {{ estimate.cost + estimate.mempoolBaseFee + estimate.vsizeFee | number }} sats
-
-
-
-
-
-
- Cost if your tx is accelerated using {{ estimate.targetFeeRate | number : '1.0-0' }} sat/vB
-
-
-
-
-
-
- Maximum acceleration cost
-
-
- {{ maxCost | number }} sats
-
-
-
-
-
-
-
- Cost if your tx is accelerated using ~{{ ((estimate.txSummary.effectiveFee + userBid) / estimate.txSummary.effectiveVsize) | number : '1.0-0' }} sat/vB
-
-
-
-
-
-
- Available balance
-
-
- {{ estimate.userBalance | number }} sats
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Accelerate
+
+
Acceleration summary
+
+
+
+
+
+
+
+ Your maximum tx fees
+
+
+ ~{{ ((estimate.txSummary.effectiveFee + userBid) / estimate.txSummary.effectiveVsize) | number : '1.0-0' }} sat/vB
+
+
+
+
+ The maximum extra transaction fee you're willing to pay
+
+
+
+ {{ userBid | number }} sats
+
+
+
+
+
+
+
+
+ Mempool Acceleratorâ„¢ fee
+
+
+ +{{ estimate.mempoolBaseFee + estimate.vsizeFee | number }} sats
+
+
+
+
+
+ mempool.space fee
+
+
+
+ {{ estimate.mempoolBaseFee | number }} sats
+
+
+
+
+
+
+ Transaction vsize fee
+
+
+
+ {{ estimate.vsizeFee | number }} sats
+
+
+
+
+
+
+
+
+ Estimated acceleration cost
+
+
+
+ {{ estimate.cost + estimate.mempoolBaseFee + estimate.vsizeFee | number }} sats
+
+
+
+
+
+
+ Cost if your tx is accelerated using {{ estimate.targetFeeRate | number : '1.0-0' }} sat/vB
+
+
+
+
+
+
+ Maximum acceleration cost
+
+
+ {{ maxCost | number }} sats
+
+
+
+
+
+
+
+ Cost if your tx is accelerated using ~{{ ((estimate.txSummary.effectiveFee + userBid) / estimate.txSummary.effectiveVsize) | number : '1.0-0' }} sat/vB
+
+
+
+
+
+
+ Available balance
+
+
+ {{ estimate.userBalance | number }} sats
+
+
+
+
+
+
+
+
+
+
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss
index e6c717369..f6e68a77a 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss
@@ -24,4 +24,11 @@
& tr {
text-wrap: wrap;
}
+}
+
+.accelerate-cols {
+ display: flex;
+ flex-direction: row;
+ align-items: stretch;
+ margin-top: 1em;
}
\ No newline at end of file
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts
index b4c7af704..27074c724 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts
@@ -2,6 +2,7 @@ import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges } from '@
import { ApiService } from '../../services/api.service';
import { Subscription, catchError, of, tap } from 'rxjs';
import { StorageService } from '../../services/storage.service';
+import { Transaction } from '../../interfaces/electrs.interface';
export type AccelerationEstimate = {
txSummary: TxSummary;
@@ -20,17 +21,24 @@ export type TxSummary = {
ancestorCount: number; // Number of ancestors
}
+export interface RateOption {
+ fee: number;
+ rate: number;
+ index: number;
+}
+
export const DEFAULT_BID_RATIO = 5;
export const MIN_BID_RATIO = 2;
export const MAX_BID_RATIO = 20;
+
@Component({
selector: 'app-accelerate-preview',
templateUrl: 'accelerate-preview.component.html',
styleUrls: ['accelerate-preview.component.scss']
})
export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges {
- @Input() txid: string | undefined;
+ @Input() tx: Transaction | undefined;
@Input() scrollEvent: boolean;
math = Math;
@@ -47,6 +55,8 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
userBid = 0;
selectFeeRateIndex = 2;
+ maxRateOptions: RateOption[] = [];
+
constructor(
private apiService: ApiService,
private storageService: StorageService
@@ -65,7 +75,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
}
ngOnInit() {
- this.estimateSubscription = this.apiService.estimate$(this.txid).pipe(
+ this.estimateSubscription = this.apiService.estimate$(this.tx.txid).pipe(
tap((response) => {
if (response.status === 204) {
this.estimate = undefined;
@@ -88,8 +98,15 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
}
// Make min extra fee at least 50% of the current tx fee
- this.minExtraCost = Math.max(this.estimate.cost, this.estimate.txSummary.effectiveFee / 2);
- this.minExtraCost = Math.round(this.minExtraCost);
+ this.minExtraCost = Math.round(Math.max(this.estimate.cost, this.estimate.txSummary.effectiveFee / 2));
+
+ this.maxRateOptions = [2, 5, 10, 20].map((multiplier, index) => {
+ return {
+ fee: this.minExtraCost * multiplier,
+ rate: (this.estimate.txSummary.effectiveFee + (this.minExtraCost * multiplier)) / this.estimate.txSummary.effectiveVsize,
+ index,
+ };
+ });
this.minBidAllowed = this.minExtraCost * MIN_BID_RATIO;
this.maxBidAllowed = this.minExtraCost * MAX_BID_RATIO;
@@ -121,10 +138,10 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
/**
* User changed his bid
*/
- setUserBid(multiplier: number, index: number) {
+ setUserBid({ fee, index }: { fee: number, index: number}) {
if (this.estimate) {
this.selectFeeRateIndex = index;
- this.userBid = Math.max(0, this.minExtraCost * multiplier);
+ this.userBid = Math.max(0, fee);
this.maxCost = this.userBid + this.estimate.mempoolBaseFee + this.estimate.vsizeFee;
}
}
@@ -156,7 +173,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
this.accelerationSubscription.unsubscribe();
}
this.accelerationSubscription = this.apiService.accelerate$(
- this.txid,
+ this.tx.txid,
this.userBid
).subscribe({
next: () => {
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index ce5d703fb..006870864 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -84,7 +84,7 @@
Accelerate
diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts
index d77eea2cf..f7c253a96 100644
--- a/frontend/src/app/shared/shared.module.ts
+++ b/frontend/src/app/shared/shared.module.ts
@@ -94,6 +94,7 @@ import { GeolocationComponent } from '../shared/components/geolocation/geolocati
import { TestnetAlertComponent } from './components/testnet-alert/testnet-alert.component';
import { GlobalFooterComponent } from './components/global-footer/global-footer.component';
import { AcceleratePreviewComponent } from '../components/accelerate-preview/accelerate-preview.component';
+import { AccelerateFeeGraphComponent } from '../components/accelerate-preview/accelerate-fee-graph.component';
import { MempoolErrorComponent } from './components/mempool-error/mempool-error.component';
import { MempoolBlockOverviewComponent } from '../components/mempool-block-overview/mempool-block-overview.component';
@@ -192,6 +193,7 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
TestnetAlertComponent,
GlobalFooterComponent,
AcceleratePreviewComponent,
+ AccelerateFeeGraphComponent,
CalculatorComponent,
BitcoinsatoshisPipe,
MempoolBlockOverviewComponent,
@@ -315,6 +317,7 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
PreviewTitleComponent,
GlobalFooterComponent,
AcceleratePreviewComponent,
+ AccelerateFeeGraphComponent,
MempoolErrorComponent,
MempoolBlockOverviewComponent,