- ETA |
+ ETA |
= 7" [ngIfElse]="belowBlockLimit">
-
- In several hours (or more)
- Accelerate
+
+ In several hours (or more)
+
@@ -109,9 +144,11 @@
-
-
- Accelerate
+
+
+
diff --git a/frontend/src/app/components/transaction/transaction.component.scss b/frontend/src/app/components/transaction/transaction.component.scss
index 5bef401d7..45357471a 100644
--- a/frontend/src/app/components/transaction/transaction.component.scss
+++ b/frontend/src/app/components/transaction/transaction.component.scss
@@ -228,11 +228,15 @@
}
}
+.link.accelerator {
+ cursor: pointer;
+}
+
.accelerate {
align-self: auto;
margin-top: 3px;
+ margin-left: 10px;
@media (min-width: 850px) {
justify-self: start;
- margin-left: 0px;
}
}
\ No newline at end of file
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts
index f1f3850e4..db200e9b1 100644
--- a/frontend/src/app/components/transaction/transaction.component.ts
+++ b/frontend/src/app/components/transaction/transaction.component.ts
@@ -19,6 +19,7 @@ import { WebsocketService } from '../../services/websocket.service';
import { AudioService } from '../../services/audio.service';
import { ApiService } from '../../services/api.service';
import { SeoService } from '../../services/seo.service';
+import { StorageService } from '../../services/storage.service';
import { BlockExtended, CpfpInfo, RbfTree, MempoolPosition, DifficultyAdjustment } from '../../interfaces/node-api.interface';
import { LiquidUnblinding } from './liquid-ublinding';
import { RelativeUrlPipe } from '../../shared/pipes/relative-url/relative-url.pipe';
@@ -88,6 +89,9 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
rbfEnabled: boolean;
taprootEnabled: boolean;
hasEffectiveFeeRate: boolean;
+ accelerateCtaType: 'alert' | 'button' = 'alert';
+ acceleratorAvailable: boolean = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && this.stateService.env.ACCELERATOR && this.stateService.network === '';
+ showAccelerationSummary = false;
@ViewChild('graphContainer')
graphContainer: ElementRef;
@@ -104,14 +108,20 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
private apiService: ApiService,
private seoService: SeoService,
private priceService: PriceService,
+ private storageService: StorageService
) {}
ngOnInit() {
this.websocketService.want(['blocks', 'mempool-blocks']);
this.stateService.networkChanged$.subscribe(
- (network) => (this.network = network)
+ (network) => {
+ this.network = network;
+ this.acceleratorAvailable = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && this.stateService.env.ACCELERATOR && this.stateService.network === '';
+ }
);
+ this.accelerateCtaType = (this.storageService.getValue('accel-cta-type') as 'alert' | 'button') ?? 'alert';
+
this.setFlowEnabled();
this.flowPrefSubscription = this.stateService.hideFlow.subscribe((hide) => {
this.hideFlow = !!hide;
@@ -486,6 +496,19 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.setGraphSize();
}
+ dismissAccelAlert(): void {
+ this.storageService.setValue('accel-cta-type', 'button');
+ this.accelerateCtaType = 'button';
+ }
+
+ onAccelerateClicked(): void {
+ if (!this.txId) {
+ return;
+ }
+
+ this.showAccelerationSummary = true && this.acceleratorAvailable;
+ }
+
handleLoadElectrsTransactionError(error: any): Observable {
if (error.status === 404 && /^[a-fA-F0-9]{64}$/.test(this.txId)) {
this.websocketService.startMultiTrackTransaction(this.txId);
diff --git a/frontend/src/app/services/api.service.ts b/frontend/src/app/services/api.service.ts
index cd1109da1..2d9077a97 100644
--- a/frontend/src/app/services/api.service.ts
+++ b/frontend/src/app/services/api.service.ts
@@ -388,4 +388,8 @@ export class ApiService {
getServicesBackendInfo$(): Observable {
return this.httpClient.get(`${SERVICES_API_PREFIX}/version`);
}
+
+ estimate$(txInput: string) {
+ return this.httpClient.post(`${SERVICES_API_PREFIX}/accelerator/estimate`, { txInput: txInput }, { observe: 'response' });
+ }
}
diff --git a/frontend/src/app/shared/components/confirmations/confirmations.component.html b/frontend/src/app/shared/components/confirmations/confirmations.component.html
index db3f1f38a..4ad3cb33a 100644
--- a/frontend/src/app/shared/components/confirmations/confirmations.component.html
+++ b/frontend/src/app/shared/components/confirmations/confirmations.component.html
@@ -1,19 +1,19 @@
-
- Confirmed
+ Confirmed
- Replaced
+ Replaced
- Removed
+ Removed
- Unconfirmed
+ Unconfirmed
\ No newline at end of file
diff --git a/frontend/src/app/shared/components/confirmations/confirmations.component.scss b/frontend/src/app/shared/components/confirmations/confirmations.component.scss
index e69de29bb..c8af7dd76 100644
--- a/frontend/src/app/shared/components/confirmations/confirmations.component.scss
+++ b/frontend/src/app/shared/components/confirmations/confirmations.component.scss
@@ -0,0 +1,4 @@
+.no-cursor {
+ cursor: default !important;
+ pointer-events: none;
+}
\ No newline at end of file
From fcecbe49677144328c743ba86b6d3fbd95305cc8 Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Sat, 26 Aug 2023 09:52:55 +0200
Subject: [PATCH 36/62] [tx] integrated accelerator
---
.../accelerate-preview.component.html | 231 ++++++++++++++++++
.../accelerate-preview.component.scss | 20 ++
.../accelerate-preview.component.ts | 163 +++++++++++-
.../transaction/transaction.component.html | 32 +--
.../transaction/transaction.component.scss | 59 +++--
.../transaction/transaction.component.ts | 7 +-
frontend/src/app/services/api.service.ts | 4 +
.../mempool-error.component.html | 2 +
.../mempool-error/mempool-error.component.ts | 47 ++++
frontend/src/app/shared/shared.module.ts | 8 +-
10 files changed, 519 insertions(+), 54 deletions(-)
create mode 100644 frontend/src/app/shared/components/mempool-error/mempool-error.component.html
create mode 100644 frontend/src/app/shared/components/mempool-error/mempool-error.component.ts
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
index e69de29bb..e2c6e3c22 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
@@ -0,0 +1,231 @@
+
+
+
+ Transaction has now been submitted to mining pools for acceleration. You can track the progress here.
+
+
+
+
+
+
+ 1">
+
+
+ This transactions is part of a CPFP tree. Fee rates (in sats/vb) are provided for your information. Change in the CPFP tree will lead to different fee rates values.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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 }} satss
+
+
+ |
+
+
+
+ Cost if your tx is accelerated using {{ estimate.targetFeeRate | number : '1.0-0' }} sat/vB
+ |
+
+
+
+
+
+ Maximum acceleration cost
+ |
+
+ {{ maxCost | number }} satss
+
+
+
+ |
+
+
+
+ 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 }} satss
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
\ 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 e69de29bb..b6981b8a7 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss
@@ -0,0 +1,20 @@
+.fee-card {
+ padding: 15px;
+ background-color: #1d1f31;
+}
+
+.btn-border {
+ border: solid 1px black;
+ background-color: #0c4a87;
+}
+
+.feerate.active {
+ background-color: #105fb0 !important;
+ opacity: 1;
+ border: 1px solid white !important;
+}
+
+.estimateDisabled {
+ opacity: 0.5;
+ pointer-events: none;
+}
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 dc8b9b5df..bea0efb88 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts
@@ -1,24 +1,169 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
+import { ApiService } from '../../services/api.service';
+import { Subscription, catchError, of, tap } from 'rxjs';
+
+export type AccelerationEstimate = {
+ txSummary: TxSummary;
+ nextBlockFee: number;
+ targetFeeRate: number;
+ userBalance: number;
+ enoughBalance: boolean;
+ cost: number;
+ mempoolBaseFee: number;
+ vsizeFee: number;
+}
+export type TxSummary = {
+ txid: string; // txid of the current transaction
+ effectiveVsize: number; // Total vsize of the dependency tree
+ effectiveFee: number; // Total fee of the dependency tree in sats
+ ancestorCount: number; // Number of ancestors
+}
+
+export const DEFAULT_BID_RATIO = 5;
+export const MIN_BID_RATIO = 2;
+export const MAX_BID_RATIO = 20;
@Component({
- selector: 'app-accelerator-preview',
+ 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() scrollEvent: boolean;
+
+ math = Math;
+ error = '';
+ showSuccess = false;
+ estimateSubscription: Subscription;
+ accelerationSubscription: Subscription;
+ estimate: any;
+ minExtraCost = 0;
+ minBidAllowed = 0;
+ maxBidAllowed = 0;
+ defaultBid = 0;
+ maxCost = 0;
+ userBid = 0;
+ selectFeeRateIndex = 2;
-export class AcceleratePreviewComponent implements OnInit {
constructor(
private apiService: ApiService
) { }
+ ngOnDestroy(): void {
+ if (this.estimateSubscription) {
+ this.estimateSubscription.unsubscribe();
+ }
+ }
+
+ ngOnChanges(changes: SimpleChanges): void {
+ if (changes.scrollEvent) {
+ this.scrollToPreview('acceleratePreviewAnchor', 'center');
+ }
+ }
+
ngOnInit() {
- this.apiService.estimate$(this.txId).subscribe((estimate) => {
- console.log(estimate.body);
- document.getElementById('acceleratePreviewAnchor').scrollIntoView({
+ this.estimateSubscription = this.apiService.estimate$(this.txid).pipe(
+ tap((response) => {
+ if (response.status === 204) {
+ this.estimate = undefined;
+ this.error = `cannot_accelerate_tx`;
+ this.scrollToPreviewWithTimeout('mempoolError', 'center');
+ this.estimateSubscription.unsubscribe();
+ } else {
+ this.estimate = response.body;
+ if (!this.estimate) {
+ this.error = `cannot_accelerate_tx`;
+ this.scrollToPreviewWithTimeout('mempoolError', 'center');
+ this.estimateSubscription.unsubscribe();
+ }
+
+ if (this.estimate.userBalance <= 0) {
+ this.error = `not_enough_balance`;
+ this.scrollToPreviewWithTimeout('mempoolError', 'center');
+ }
+
+ // 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.minBidAllowed = this.minExtraCost * MIN_BID_RATIO;
+ this.maxBidAllowed = this.minExtraCost * MAX_BID_RATIO;
+ this.defaultBid = this.minExtraCost * DEFAULT_BID_RATIO;
+
+ this.userBid = this.defaultBid;
+ if (this.userBid < this.minBidAllowed) {
+ this.userBid = this.minBidAllowed;
+ } else if (this.userBid > this.maxBidAllowed) {
+ this.userBid = this.maxBidAllowed;
+ }
+ this.maxCost = this.userBid + this.estimate.mempoolBaseFee + this.estimate.vsizeFee;
+
+ if (!this.error) {
+ this.scrollToPreview('acceleratePreviewAnchor', 'center');
+ }
+ }
+ }),
+ catchError((response) => {
+ this.estimate = undefined;
+ this.error = response.error;
+ this.scrollToPreviewWithTimeout('mempoolError', 'center');
+ this.estimateSubscription.unsubscribe();
+ return of(null);
+ })
+ ).subscribe();
+ }
+
+ /**
+ * User changed his bid
+ */
+ setUserBid(multiplier: number, index: number) {
+ if (this.estimate) {
+ this.selectFeeRateIndex = index;
+ this.userBid = Math.max(0, this.minExtraCost * multiplier);
+ this.maxCost = this.userBid + this.estimate.mempoolBaseFee + this.estimate.vsizeFee;
+ }
+ }
+
+ /**
+ * Scroll to element id with or without setTimeout
+ */
+ scrollToPreviewWithTimeout(id: string, position: ScrollLogicalPosition) {
+ setTimeout(() => {
+ this.scrollToPreview(id, position);
+ }, 100);
+ }
+ scrollToPreview(id: string, position: ScrollLogicalPosition) {
+ const acceleratePreviewAnchor = document.getElementById(id);
+ if (acceleratePreviewAnchor) {
+ acceleratePreviewAnchor.scrollIntoView({
behavior: 'smooth',
- inline: 'center',
- block: 'center',
+ inline: position,
+ block: position,
});
- })
+ }
+}
+
+ /**
+ * Send acceleration request
+ */
+ accelerate() {
+ if (this.accelerationSubscription) {
+ this.accelerationSubscription.unsubscribe();
+ }
+ this.accelerationSubscription = this.apiService.accelerate$(
+ this.txid,
+ this.userBid
+ ).subscribe({
+ next: () => {
+ this.showSuccess = true;
+ this.scrollToPreviewWithTimeout('successAlert', 'center');
+ this.estimateSubscription.unsubscribe();
+ },
+ error: (response) => {
+ this.error = response.error;
+ this.scrollToPreviewWithTimeout('mempoolError', 'center');
+ }
+ });
}
}
\ No newline at end of file
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 36c7ab9f3..f7dd45d3b 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -6,7 +6,7 @@
-
+
Accelerate this transaction using the Mempool Accelerator ™
×
@@ -78,33 +78,17 @@
+
Accelerate
-
-
-
@@ -132,10 +116,9 @@
= 7" [ngIfElse]="belowBlockLimit">
-
+
In several hours (or more)
-
- Accelerate
+ Accelerate
@@ -143,10 +126,9 @@
-
+
-
- Accelerate
+ Accelerate
diff --git a/frontend/src/app/components/transaction/transaction.component.scss b/frontend/src/app/components/transaction/transaction.component.scss
index 45357471a..2e076600e 100644
--- a/frontend/src/app/components/transaction/transaction.component.scss
+++ b/frontend/src/app/components/transaction/transaction.component.scss
@@ -130,7 +130,7 @@
}
.table {
- tr td {
+ tr td {
padding: 0.75rem 0.5rem;
@media (min-width: 576px) {
padding: 0.75rem 0.75rem;
@@ -138,7 +138,7 @@
&:last-child {
text-align: right;
@media (min-width: 850px) {
- text-align: left;
+ text-align: left;
}
}
.btn {
@@ -218,25 +218,52 @@
}
}
-.eta {
- display: flex;
- justify-content: end;
- flex-wrap: wrap;
- align-content: center;
- @media (min-width: 850px) {
- justify-content: space-between;
- }
-}
-
.link.accelerator {
cursor: pointer;
}
+.eta {
+ display: flex;
+ flex-wrap: wrap;
+ align-content: center;
+ @media (min-width: 850px) {
+ justify-content: left !important;
+ }
+}
+
.accelerate {
+ display: flex !important;
align-self: auto;
margin-top: 3px;
- margin-left: 10px;
- @media (min-width: 850px) {
- justify-self: start;
+ margin-left: auto;
+ background-color: #653b9c;
+ @media (max-width: 849px) {
+ margin-left: 5px;
}
-}
\ No newline at end of file
+}
+
+.etaDeepMempool {
+ display: flex !important;
+ justify-content: end;
+ flex-wrap: wrap;
+ align-content: center;
+ @media (max-width: 995px) {
+ justify-content: left !important;
+ }
+ @media (max-width: 849px) {
+ justify-content: right !important;
+ }
+}
+
+.accelerateDeepMempool {
+ align-self: auto;
+ margin-top: 3px;
+ margin-left: auto;
+ background-color: #653b9c;
+ @media (max-width: 995px) {
+ margin-left: 0px;
+ }
+ @media (max-width: 849px) {
+ margin-left: 5px;
+ }
+}
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts
index c3e4cc25c..ac1452835 100644
--- a/frontend/src/app/components/transaction/transaction.component.ts
+++ b/frontend/src/app/components/transaction/transaction.component.ts
@@ -83,7 +83,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
blockConversion: Price;
tooltipPosition: { x: number, y: number };
isMobile: boolean;
- acceleratorAvailable: boolean = false;
featuresEnabled: boolean;
segwitEnabled: boolean;
@@ -93,6 +92,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
accelerateCtaType: 'alert' | 'button' = 'alert';
acceleratorAvailable: boolean = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && this.stateService.env.ACCELERATOR && this.stateService.network === '';
showAccelerationSummary = false;
+ scrollIntoAccelPreview = false;
@ViewChild('graphContainer')
graphContainer: ElementRef;
@@ -504,12 +504,13 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.accelerateCtaType = 'button';
}
- onAccelerateClicked(): void {
+ onAccelerateClicked() {
if (!this.txId) {
return;
}
-
this.showAccelerationSummary = true && this.acceleratorAvailable;
+ this.scrollIntoAccelPreview = !this.scrollIntoAccelPreview;
+ return false;
}
handleLoadElectrsTransactionError(error: any): Observable {
diff --git a/frontend/src/app/services/api.service.ts b/frontend/src/app/services/api.service.ts
index 2d9077a97..ea185b1ec 100644
--- a/frontend/src/app/services/api.service.ts
+++ b/frontend/src/app/services/api.service.ts
@@ -392,4 +392,8 @@ export class ApiService {
estimate$(txInput: string) {
return this.httpClient.post(`${SERVICES_API_PREFIX}/accelerator/estimate`, { txInput: txInput }, { observe: 'response' });
}
+
+ accelerate$(txInput: string, userBid: number) {
+ return this.httpClient.post(`${SERVICES_API_PREFIX}/accelerator/accelerate`, { txInput: txInput, userBid: userBid });
+ }
}
diff --git a/frontend/src/app/shared/components/mempool-error/mempool-error.component.html b/frontend/src/app/shared/components/mempool-error/mempool-error.component.html
new file mode 100644
index 000000000..020b147a9
--- /dev/null
+++ b/frontend/src/app/shared/components/mempool-error/mempool-error.component.html
@@ -0,0 +1,2 @@
+
+
diff --git a/frontend/src/app/shared/components/mempool-error/mempool-error.component.ts b/frontend/src/app/shared/components/mempool-error/mempool-error.component.ts
new file mode 100644
index 000000000..19e057950
--- /dev/null
+++ b/frontend/src/app/shared/components/mempool-error/mempool-error.component.ts
@@ -0,0 +1,47 @@
+import { Component, Input, OnInit } from "@angular/core";
+import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
+
+const MempoolErrors = {
+ 'acceleration_duplicated': `This transaction has already been accelerated.`,
+ 'acceleration_outbid': `Your fee delta is too low.`,
+ 'cannot_accelerate_tx': `Cannot accelerate this transaction.`,
+ 'cannot_decode_raw_tx': `Cannot decode this raw transaction.`,
+ 'cannot_fetch_raw_tx': `Cannot find this transaction.`,
+ 'database_error': `Something went wrong. Please try again later.`,
+ 'high_sigop_tx': `This transaction cannot be accelerated.`,
+ 'invalid_acceleration_request': `This acceleration request is not valid.`,
+ 'invalid_tx_dependencies': `This transaction dependencies are not valid.`,
+ 'mempool_rejected_raw_tx': `Our mempool rejected this transaction`,
+ 'no_mining_pool_available': `No mining pool available at the moment`,
+ 'not_available': `You current subscription does not allow you to access this feature. Consider upgrading.`,
+ 'not_enough_balance': `Your account balance is too low. Please make a deposit.`,
+ 'not_verified': `You must verify your account to use this feature.`,
+ 'recommended_fees_not_available': `Recommended fees are not available right now.`,
+ 'too_many_relatives': `This transaction has too many relatives.`,
+ 'txid_not_in_mempool': `This transaction is not in the mempool.`,
+ 'waitlisted': `You are currently on the wait list. You will get notified once you are granted access.`,
+ 'not_whitelisted_by_any_pool': `You are not whitelisted by any mining pool`,
+} as { [error: string]: string };
+
+export function isMempoolError(error: string) {
+ return Object.keys(MempoolErrors).includes(error);
+}
+
+@Component({
+ selector: 'app-mempool-error',
+ templateUrl: './mempool-error.component.html'
+})
+export class MempoolErrorComponent implements OnInit {
+ @Input() error: string;
+ errorContent: SafeHtml;
+
+ constructor(private sanitizer: DomSanitizer) { }
+
+ ngOnInit(): void {
+ if (Object.keys(MempoolErrors).includes(this.error)) {
+ this.errorContent = this.sanitizer.bypassSecurityTrustHtml(MempoolErrors[this.error]);
+ } else {
+ this.errorContent = this.error;
+ }
+ }
+}
diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts
index 891f8f987..d77eea2cf 100644
--- a/frontend/src/app/shared/shared.module.ts
+++ b/frontend/src/app/shared/shared.module.ts
@@ -93,6 +93,8 @@ import { ToggleComponent } from './components/toggle/toggle.component';
import { GeolocationComponent } from '../shared/components/geolocation/geolocation.component';
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 { MempoolErrorComponent } from './components/mempool-error/mempool-error.component';
import { MempoolBlockOverviewComponent } from '../components/mempool-block-overview/mempool-block-overview.component';
import { ClockchainComponent } from '../components/clockchain/clockchain.component';
@@ -189,6 +191,7 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
GeolocationComponent,
TestnetAlertComponent,
GlobalFooterComponent,
+ AcceleratePreviewComponent,
CalculatorComponent,
BitcoinsatoshisPipe,
MempoolBlockOverviewComponent,
@@ -196,7 +199,8 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
ClockComponent,
ClockFaceComponent,
OnlyVsizeDirective,
- OnlyWeightDirective
+ OnlyWeightDirective,
+ MempoolErrorComponent,
],
imports: [
CommonModule,
@@ -310,6 +314,8 @@ import { OnlyVsizeDirective, OnlyWeightDirective } from './components/weight-dir
GeolocationComponent,
PreviewTitleComponent,
GlobalFooterComponent,
+ AcceleratePreviewComponent,
+ MempoolErrorComponent,
MempoolBlockOverviewComponent,
ClockchainComponent,
From 1fe08d1234d6cfcdbbe22d1aabfc9048e58a3ce9 Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Sat, 26 Aug 2023 10:05:04 +0200
Subject: [PATCH 37/62] [accelerator] fix overflow in tx page integrated accel
---
.../accelerate-preview/accelerate-preview.component.html | 4 ++--
.../accelerate-preview/accelerate-preview.component.scss | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
index e2c6e3c22..5afdc07f9 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
@@ -24,7 +24,7 @@
-
+
@@ -110,7 +110,7 @@
Acceleration summary
-
+
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 b6981b8a7..e6c717369 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.scss
@@ -18,3 +18,10 @@
opacity: 0.5;
pointer-events: none;
}
+
+.table-accelerator {
+ table-layout: fixed;
+ & tr {
+ text-wrap: wrap;
+ }
+}
\ No newline at end of file
From 726bd51abb9b26da9e3de74525df04fc9cb3780c Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Sat, 26 Aug 2023 11:27:45 +0200
Subject: [PATCH 38/62] [debug] update versioning print
---
frontend/src/app/interfaces/websocket.interface.ts | 2 +-
.../components/global-footer/global-footer.component.html | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/frontend/src/app/interfaces/websocket.interface.ts b/frontend/src/app/interfaces/websocket.interface.ts
index 43ab1e5f4..1d0414de7 100644
--- a/frontend/src/app/interfaces/websocket.interface.ts
+++ b/frontend/src/app/interfaces/websocket.interface.ts
@@ -95,7 +95,7 @@ export interface TransactionStripped {
}
export interface IBackendInfo {
- hostname: string;
+ hostname?: string;
gitCommit: string;
version: string;
}
diff --git a/frontend/src/app/shared/components/global-footer/global-footer.component.html b/frontend/src/app/shared/components/global-footer/global-footer.component.html
index 73b4d0975..b12874832 100644
--- a/frontend/src/app/shared/components/global-footer/global-footer.component.html
+++ b/frontend/src/app/shared/components/global-footer/global-footer.component.html
@@ -91,9 +91,11 @@
From a3d61fa52546b1406a8e932648c8c91b73055f5e Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Sat, 26 Aug 2023 15:07:05 +0200
Subject: [PATCH 39/62] [accelerator] show payment preview when not logged in
---
.../accelerate-preview.component.html | 2 +-
.../accelerate-preview.component.ts | 15 ++++++++++++---
frontend/src/app/services/api.service.ts | 12 +++---------
3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
index 5afdc07f9..c546d3859 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
@@ -219,7 +219,7 @@
-
+
Accelerate
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 bea0efb88..b4c7af704 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts
@@ -1,6 +1,7 @@
import { Component, OnInit, Input, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
import { ApiService } from '../../services/api.service';
import { Subscription, catchError, of, tap } from 'rxjs';
+import { StorageService } from '../../services/storage.service';
export type AccelerationEstimate = {
txSummary: TxSummary;
@@ -47,7 +48,8 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
selectFeeRateIndex = 2;
constructor(
- private apiService: ApiService
+ private apiService: ApiService,
+ private storageService: StorageService
) { }
ngOnDestroy(): void {
@@ -79,8 +81,10 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
}
if (this.estimate.userBalance <= 0) {
- this.error = `not_enough_balance`;
- this.scrollToPreviewWithTimeout('mempoolError', 'center');
+ if (this.isLoggedIn()) {
+ this.error = `not_enough_balance`;
+ this.scrollToPreviewWithTimeout('mempoolError', 'center');
+ }
}
// Make min extra fee at least 50% of the current tx fee
@@ -166,4 +170,9 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
}
});
}
+
+ isLoggedIn() {
+ const auth = this.storageService.getAuth();
+ return auth !== null;
+ }
}
\ No newline at end of file
diff --git a/frontend/src/app/services/api.service.ts b/frontend/src/app/services/api.service.ts
index ea185b1ec..744474f9d 100644
--- a/frontend/src/app/services/api.service.ts
+++ b/frontend/src/app/services/api.service.ts
@@ -357,9 +357,7 @@ export class ApiService {
return of(null);
}
- return this.httpClient.get (`${SERVICES_API_PREFIX}/account/menu`, {
- headers: { 'Authorization': auth.token }
- });
+ return this.httpClient.get(`${SERVICES_API_PREFIX}/account/menu`);
}
getUserInfo$(): Observable {
@@ -368,9 +366,7 @@ export class ApiService {
return of(null);
}
- return this.httpClient.get(`${SERVICES_API_PREFIX}/account`, {
- headers: { 'Authorization': auth.token }
- });
+ return this.httpClient.get(`${SERVICES_API_PREFIX}/account`);
}
logout$(): Observable {
@@ -380,9 +376,7 @@ export class ApiService {
}
localStorage.removeItem('auth');
- return this.httpClient.post(`${SERVICES_API_PREFIX}/auth/logout`, {
- headers: { 'Authorization': auth.token }
- });
+ return this.httpClient.post(`${SERVICES_API_PREFIX}/auth/logout`, {});
}
getServicesBackendInfo$(): Observable {
From 5f4add3e22c43256776a31fd6a45a01ffc469cff Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Sun, 27 Aug 2023 09:07:47 +0200
Subject: [PATCH 40/62] [tx] fix css when accel not available
---
.../app/components/transaction/transaction.component.html | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index f7dd45d3b..141c536ee 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -6,7 +6,7 @@
-
+
Accelerate this transaction using the Mempool Accelerator ™
×
@@ -116,9 +116,9 @@
= 7" [ngIfElse]="belowBlockLimit">
-
+
In several hours (or more)
- Accelerate
+ Accelerate
@@ -128,7 +128,7 @@
- Accelerate
+ Accelerate
From 78ea9cbd16aefb433eff3014723b4369327f45a3 Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Sun, 27 Aug 2023 12:52:58 +0200
Subject: [PATCH 41/62] [ui] polish x1
---
.../master-page/master-page.component.html | 4 +--
.../master-page/master-page.component.ts | 19 ++++++++++++--
.../src/app/components/menu/menu.component.ts | 25 +++++++++++--------
3 files changed, 33 insertions(+), 15 deletions(-)
diff --git a/frontend/src/app/components/master-page/master-page.component.html b/frontend/src/app/components/master-page/master-page.component.html
index b24442f23..74a95daf5 100644
--- a/frontend/src/app/components/master-page/master-page.component.html
+++ b/frontend/src/app/components/master-page/master-page.component.html
@@ -77,12 +77,12 @@
-
+
-
+
diff --git a/frontend/src/app/components/master-page/master-page.component.ts b/frontend/src/app/components/master-page/master-page.component.ts
index 06ec1784e..49bed7a5d 100644
--- a/frontend/src/app/components/master-page/master-page.component.ts
+++ b/frontend/src/app/components/master-page/master-page.component.ts
@@ -1,4 +1,5 @@
import { Component, OnInit, Input, ViewChild } from '@angular/core';
+import { Router } from '@angular/router';
import { Env, StateService } from '../../services/state.service';
import { Observable, merge, of } from 'rxjs';
import { LanguageService } from '../../services/language.service';
@@ -31,9 +32,10 @@ export class MasterPageComponent implements OnInit {
userAuth: any | undefined;
user: any = undefined;
servicesEnabled = false;
+ menuOpen = false;
@ViewChild(MenuComponent)
- private menuComponent!: MenuComponent;
+ public menuComponent!: MenuComponent;
constructor(
public stateService: StateService,
@@ -42,6 +44,7 @@ export class MasterPageComponent implements OnInit {
private navigationService: NavigationService,
private storageService: StorageService,
private apiService: ApiService,
+ private router: Router,
) { }
ngOnInit(): void {
@@ -65,14 +68,21 @@ export class MasterPageComponent implements OnInit {
this.servicesEnabled = this.officialMempoolSpace && this.stateService.env.ACCELERATOR === true && this.stateService.network === '';
this.refreshAuth();
+
+ const isServicesPage = this.router.url.includes('/services/');
+ this.menuOpen = isServicesPage && !this.isSmallScreen();
}
collapse(): void {
this.navCollapsed = !this.navCollapsed;
}
+ isSmallScreen() {
+ return window.innerWidth <= 767.98;
+ }
+
onResize(): void {
- this.isMobile = window.innerWidth <= 767.98;
+ this.isMobile = this.isSmallScreen();
}
brandClick(e): void {
@@ -90,7 +100,12 @@ export class MasterPageComponent implements OnInit {
hamburgerClick(event): void {
if (this.menuComponent) {
this.menuComponent.hamburgerClick();
+ this.menuOpen = this.menuComponent.navOpen;
event.stopPropagation();
}
}
+
+ menuToggled(isOpen: boolean): void {
+ this.menuOpen = isOpen;
+ }
}
diff --git a/frontend/src/app/components/menu/menu.component.ts b/frontend/src/app/components/menu/menu.component.ts
index a560a1b49..e6ba848bc 100644
--- a/frontend/src/app/components/menu/menu.component.ts
+++ b/frontend/src/app/components/menu/menu.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, Output, EventEmitter, HostListener } from '@angular/core';
+import { Component, OnInit, Input, Output, EventEmitter, HostListener } from '@angular/core';
import { Observable } from 'rxjs';
import { ApiService } from '../../services/api.service';
import { MenuGroup } from '../../interfaces/services.interface';
@@ -13,9 +13,10 @@ import { StateService } from '../../services/state.service';
})
export class MenuComponent implements OnInit {
+ @Input() navOpen: boolean = false;
@Output() loggedOut = new EventEmitter();
-
- navOpen: boolean = false;
+ @Output() menuToggled = new EventEmitter();
+
userMenuGroups$: Observable | undefined;
userAuth: any | undefined;
isServicesPage = false;
@@ -34,17 +35,20 @@ export class MenuComponent implements OnInit {
}
this.isServicesPage = this.router.url.includes('/services/');
- this.navOpen = this.isServicesPage && !this.isSmallScreen();
-
this.router.events.subscribe((event) => {
if (event instanceof NavigationStart) {
if (!this.isServicesPage) {
- this.navOpen = false;
+ this.toggleMenu(false);
}
}
});
}
+ toggleMenu(toggled: boolean) {
+ this.navOpen = toggled;
+ this.menuToggled.emit(toggled);
+ }
+
isSmallScreen() {
return window.innerWidth <= 767.98;
}
@@ -61,13 +65,13 @@ export class MenuComponent implements OnInit {
onLinkClick(link) {
if (!this.isServicesPage || this.isSmallScreen()) {
- this.navOpen = false;
+ this.toggleMenu(false);
}
this.router.navigateByUrl(link);
}
hamburgerClick() {
- this.navOpen = !this.navOpen;
+ this.toggleMenu(!this.navOpen);
this.stateService.menuOpen$.next(this.navOpen);
}
@@ -78,7 +82,7 @@ export class MenuComponent implements OnInit {
if (!cssClasses.indexOf) { // Click on chart or non html thingy, close the menu
if (!this.isServicesPage || isServicesPageOnMobile) {
- this.navOpen = false;
+ this.toggleMenu(false);
}
return;
}
@@ -86,8 +90,7 @@ export class MenuComponent implements OnInit {
const isHamburger = cssClasses.indexOf('profile_image') !== -1;
const isMenu = cssClasses.indexOf('menu-click') !== -1;
if (!isHamburger && !isMenu && (!this.isServicesPage || isServicesPageOnMobile)) {
- this.navOpen = false;
- return;
+ this.toggleMenu(false);
}
}
}
From 8ba4a7b4218459bfca33d6ee8b99258c1179682b Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Sun, 27 Aug 2023 19:17:03 +0200
Subject: [PATCH 42/62] [ui] polish x2
---
.../app/components/master-page/master-page.component.scss | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/frontend/src/app/components/master-page/master-page.component.scss b/frontend/src/app/components/master-page/master-page.component.scss
index 9477ca792..f0fec0536 100644
--- a/frontend/src/app/components/master-page/master-page.component.scss
+++ b/frontend/src/app/components/master-page/master-page.component.scss
@@ -234,3 +234,8 @@ nav {
height: 35px;
border-radius: 5px;
}
+
+main {
+ transition: 0.2s;
+ transition-property: max-width;
+}
\ No newline at end of file
From 7fd8790750b151d37566ef6b0f91fd5837c93cf0 Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Mon, 28 Aug 2023 09:29:13 +0200
Subject: [PATCH 43/62] [auth] fix blinking profile picture
---
.../app/components/master-page/master-page.component.ts | 3 +--
frontend/src/app/components/menu/menu.component.ts | 5 +++++
.../components/global-footer/global-footer.component.ts | 9 +--------
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/frontend/src/app/components/master-page/master-page.component.ts b/frontend/src/app/components/master-page/master-page.component.ts
index 49bed7a5d..a92f77cf9 100644
--- a/frontend/src/app/components/master-page/master-page.component.ts
+++ b/frontend/src/app/components/master-page/master-page.component.ts
@@ -29,7 +29,6 @@ export class MasterPageComponent implements OnInit {
networkPaths: { [network: string]: string };
networkPaths$: Observable>;
footerVisible = true;
- userAuth: any | undefined;
user: any = undefined;
servicesEnabled = false;
menuOpen = false;
@@ -94,7 +93,7 @@ export class MasterPageComponent implements OnInit {
}
refreshAuth(): void {
- this.apiService.getUserInfo$().subscribe(user => this.user = user);
+ this.user = this.storageService.getAuth()?.user ?? null;
}
hamburgerClick(event): void {
diff --git a/frontend/src/app/components/menu/menu.component.ts b/frontend/src/app/components/menu/menu.component.ts
index e6ba848bc..2fb5c34d1 100644
--- a/frontend/src/app/components/menu/menu.component.ts
+++ b/frontend/src/app/components/menu/menu.component.ts
@@ -30,6 +30,11 @@ export class MenuComponent implements OnInit {
ngOnInit(): void {
this.userAuth = this.storageService.getAuth();
+ if (this.userAuth && this.userAuth.user && !this.userAuth.user.imageMd5) {
+ this.logout();
+ return;
+ }
+
if (this.stateService.env.GIT_COMMIT_HASH_MEMPOOL_SPACE) {
this.userMenuGroups$ = this.apiService.getUserMenuGroups$();
}
diff --git a/frontend/src/app/shared/components/global-footer/global-footer.component.ts b/frontend/src/app/shared/components/global-footer/global-footer.component.ts
index 75d989ff7..e76a5de0d 100644
--- a/frontend/src/app/shared/components/global-footer/global-footer.component.ts
+++ b/frontend/src/app/shared/components/global-footer/global-footer.component.ts
@@ -28,7 +28,6 @@ export class GlobalFooterComponent implements OnInit {
networkPaths: { [network: string]: string };
currentNetwork = '';
loggedIn = false;
- username = null;
urlSubscription: Subscription;
isServicesPage = false;
@@ -64,13 +63,7 @@ export class GlobalFooterComponent implements OnInit {
});
this.urlSubscription = this.route.url.subscribe((url) => {
- this.loggedIn = JSON.parse(this.storageService.getValue('auth')) !== null;
- const auth = JSON.parse(this.storageService.getValue('auth'));
- if (auth?.user?.username) {
- this.username = auth.user.username;
- } else {
- this.username = null;
- }
+ this.loggedIn = this.storageService.getAuth() !== null;
this.cd.markForCheck();
})
}
From 4abc4e96a889e7a92d9c0c5f96127b153df58251 Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Mon, 28 Aug 2023 09:34:50 +0200
Subject: [PATCH 44/62] [typo] satss -> sats
---
.../accelerate-preview/accelerate-preview.component.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
index c546d3859..c2bcbb7bf 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
@@ -173,7 +173,7 @@
- {{ estimate.cost + estimate.mempoolBaseFee + estimate.vsizeFee | number }} satss
+ {{ estimate.cost + estimate.mempoolBaseFee + estimate.vsizeFee | number }} sats
|
@@ -190,7 +190,7 @@
Maximum acceleration cost
- {{ maxCost | number }} satss
+ {{ maxCost | number }} sats
@@ -208,7 +208,7 @@
Available balance
|
- {{ estimate.userBalance | number }} satss
+ {{ estimate.userBalance | number }} sats
From d787ef99c4001ed788b7cd26903512da28f8573c Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Mon, 28 Aug 2023 10:24:44 +0200
Subject: [PATCH 45/62] [typo] the Mempool Accelerator -> Mempool Accelerator
---
.../src/app/components/transaction/transaction.component.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 141c536ee..8c8de7137 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -7,7 +7,7 @@
- Accelerate this transaction using the Mempool Accelerator ™
+ Accelerate this transaction using Mempool Accelerator ™
×
From c7b89f31dde20a1a0da6ce591296a8cd36da2ccf Mon Sep 17 00:00:00 2001
From: Mononaut
Date: Mon, 28 Aug 2023 17:42:32 +0900
Subject: [PATCH 46/62] Fix bad blockchain offset after services -> dash
---
frontend/src/app/components/menu/menu.component.ts | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/frontend/src/app/components/menu/menu.component.ts b/frontend/src/app/components/menu/menu.component.ts
index 2fb5c34d1..faeca3d24 100644
--- a/frontend/src/app/components/menu/menu.component.ts
+++ b/frontend/src/app/components/menu/menu.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, Input, Output, EventEmitter, HostListener } from '@angular/core';
+import { Component, OnInit, Input, Output, EventEmitter, HostListener, OnDestroy } from '@angular/core';
import { Observable } from 'rxjs';
import { ApiService } from '../../services/api.service';
import { MenuGroup } from '../../interfaces/services.interface';
@@ -12,7 +12,7 @@ import { StateService } from '../../services/state.service';
styleUrls: ['./menu.component.scss']
})
-export class MenuComponent implements OnInit {
+export class MenuComponent implements OnInit, OnDestroy {
@Input() navOpen: boolean = false;
@Output() loggedOut = new EventEmitter();
@Output() menuToggled = new EventEmitter();
@@ -98,4 +98,8 @@ export class MenuComponent implements OnInit {
this.toggleMenu(false);
}
}
+
+ ngOnDestroy(): void {
+ this.stateService.menuOpen$.next(false);
+ }
}
From 7a765cecd967a0627817663dc06ae02accb4305a Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Mon, 28 Aug 2023 15:41:45 +0200
Subject: [PATCH 47/62] [footer] only show cta if official
---
.../components/global-footer/global-footer.component.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/src/app/shared/components/global-footer/global-footer.component.html b/frontend/src/app/shared/components/global-footer/global-footer.component.html
index b12874832..ea3f70479 100644
--- a/frontend/src/app/shared/components/global-footer/global-footer.component.html
+++ b/frontend/src/app/shared/components/global-footer/global-footer.component.html
@@ -21,12 +21,12 @@
-
-
From 3060aecddb74630a600acfac8f3779baf9560a60 Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Mon, 28 Aug 2023 15:57:06 +0200
Subject: [PATCH 48/62] [status badge] reposition a bit higher
---
.../src/app/components/master-page/master-page.component.scss | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/app/components/master-page/master-page.component.scss b/frontend/src/app/components/master-page/master-page.component.scss
index f0fec0536..b82d973de 100644
--- a/frontend/src/app/components/master-page/master-page.component.scss
+++ b/frontend/src/app/components/master-page/master-page.component.scss
@@ -109,7 +109,7 @@ nav {
.connection-badge {
position: absolute;
- top: 22px;
+ top: 12px;
width: 100%;
}
From bbd1f088d14dae9c1fc6a8aa53e1549a4f525eb7 Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Mon, 28 Aug 2023 16:20:30 +0200
Subject: [PATCH 49/62] [footer] only show cta if official && ACCELERATOR
---
.../components/global-footer/global-footer.component.html | 4 ++--
.../components/global-footer/global-footer.component.ts | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/frontend/src/app/shared/components/global-footer/global-footer.component.html b/frontend/src/app/shared/components/global-footer/global-footer.component.html
index ea3f70479..34d47379e 100644
--- a/frontend/src/app/shared/components/global-footer/global-footer.component.html
+++ b/frontend/src/app/shared/components/global-footer/global-footer.component.html
@@ -21,12 +21,12 @@
-
-
diff --git a/frontend/src/app/shared/components/global-footer/global-footer.component.ts b/frontend/src/app/shared/components/global-footer/global-footer.component.ts
index e76a5de0d..2e3f98e2d 100644
--- a/frontend/src/app/shared/components/global-footer/global-footer.component.ts
+++ b/frontend/src/app/shared/components/global-footer/global-footer.component.ts
@@ -30,6 +30,7 @@ export class GlobalFooterComponent implements OnInit {
loggedIn = false;
urlSubscription: Subscription;
isServicesPage = false;
+ servicesEnabled = false;
constructor(
public stateService: StateService,
@@ -44,6 +45,7 @@ export class GlobalFooterComponent implements OnInit {
) {}
ngOnInit(): void {
+ this.servicesEnabled = this.officialMempoolSpace && this.stateService.env.ACCELERATOR === true && this.stateService.network === '';
this.isServicesPage = this.router.url.includes('/services/');
this.env = this.stateService.env;
From 7ae4b451e4dc2ac8c2d65d5d67ca06e4e5babd1c Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Tue, 29 Aug 2023 09:31:18 +0200
Subject: [PATCH 50/62] [auth] remove auto logout when imageMd5 no in
localstorage
---
frontend/src/app/components/menu/menu.component.ts | 4 ----
1 file changed, 4 deletions(-)
diff --git a/frontend/src/app/components/menu/menu.component.ts b/frontend/src/app/components/menu/menu.component.ts
index faeca3d24..28ba0a1ad 100644
--- a/frontend/src/app/components/menu/menu.component.ts
+++ b/frontend/src/app/components/menu/menu.component.ts
@@ -30,10 +30,6 @@ export class MenuComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this.userAuth = this.storageService.getAuth();
- if (this.userAuth && this.userAuth.user && !this.userAuth.user.imageMd5) {
- this.logout();
- return;
- }
if (this.stateService.env.GIT_COMMIT_HASH_MEMPOOL_SPACE) {
this.userMenuGroups$ = this.apiService.getUserMenuGroups$();
From 7c11f0a3dab8adf65b18e6ed24cc8870d0d3606f Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Tue, 29 Aug 2023 10:50:13 +0200
Subject: [PATCH 51/62] [tx] fix eta css
---
.../src/app/components/transaction/transaction.component.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html
index 8c8de7137..ce5d703fb 100644
--- a/frontend/src/app/components/transaction/transaction.component.html
+++ b/frontend/src/app/components/transaction/transaction.component.html
@@ -126,7 +126,7 @@
-
+
Accelerate
From c2c4047ffd7ef3fcbdbb6fa645959966aa80566d Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Tue, 29 Aug 2023 14:19:02 +0200
Subject: [PATCH 52/62] [css] fix spacing at the top
---
frontend/src/app/components/about/about.component.scss | 1 +
frontend/src/styles.scss | 4 ----
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/frontend/src/app/components/about/about.component.scss b/frontend/src/app/components/about/about.component.scss
index 2a5710ca1..f1b4d6e2b 100644
--- a/frontend/src/app/components/about/about.component.scss
+++ b/frontend/src/app/components/about/about.component.scss
@@ -22,6 +22,7 @@
.intro {
margin: 25px auto 30px;
+ margin-top: 49px;
width: 250px;
display: flex;
flex-direction: column;
diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss
index 078b6b30a..7c0ee160c 100644
--- a/frontend/src/styles.scss
+++ b/frontend/src/styles.scss
@@ -62,10 +62,6 @@ body {
position: relative;
}
-main {
- margin-top: 24px;
-}
-
.full-height {
@media (max-width: 767.98px) {
min-height: 100vh;
From 91fbd0864b458fe622fd9d37eff9590eb5b41ef8 Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Tue, 29 Aug 2023 14:34:56 +0200
Subject: [PATCH 53/62] [css] fix footer position
---
.../src/app/components/master-page/master-page.component.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/frontend/src/app/components/master-page/master-page.component.html b/frontend/src/app/components/master-page/master-page.component.html
index 74a95daf5..8863b335f 100644
--- a/frontend/src/app/components/master-page/master-page.component.html
+++ b/frontend/src/app/components/master-page/master-page.component.html
@@ -79,13 +79,14 @@
-
From c44276027ce013feaa3e9d37190170b06cb760bf Mon Sep 17 00:00:00 2001
From: nymkappa <1612910616@pm.me>
Date: Tue, 29 Aug 2023 15:51:17 +0200
Subject: [PATCH 54/62] [auto scroll] fix documention anchor scrolling
---
frontend/src/app/docs/api-docs/api-docs.component.scss | 2 +-
frontend/src/app/docs/api-docs/api-docs.component.ts | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/src/app/docs/api-docs/api-docs.component.scss b/frontend/src/app/docs/api-docs/api-docs.component.scss
index 8e4c0c7a9..b90b843d9 100644
--- a/frontend/src/app/docs/api-docs/api-docs.component.scss
+++ b/frontend/src/app/docs/api-docs/api-docs.component.scss
@@ -155,7 +155,7 @@ ul.no-bull.block-audit code{
#doc-nav-desktop.fixed {
float: unset;
position: fixed;
- top: 20px;
+ top: 80px;
overflow-y: auto;
height: calc(100vh - 50px);
scrollbar-color: #2d3348 #11131f;
diff --git a/frontend/src/app/docs/api-docs/api-docs.component.ts b/frontend/src/app/docs/api-docs/api-docs.component.ts
index 62a0fadba..b0ae5967d 100644
--- a/frontend/src/app/docs/api-docs/api-docs.component.ts
+++ b/frontend/src/app/docs/api-docs/api-docs.component.ts
@@ -43,7 +43,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
if (this.faqTemplates) {
this.faqTemplates.forEach((x) => this.dict[x.type] = x.template);
}
- this.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
+ this.desktopDocsNavPosition = ( window.pageYOffset > 115 ) ? "fixed" : "relative";
this.mobileViewport = window.innerWidth <= 992;
}
@@ -113,7 +113,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
}
onDocScroll() {
- this.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
+ this.desktopDocsNavPosition = ( window.pageYOffset > 115 ) ? "fixed" : "relative";
}
anchorLinkClick( event: any ) {
From c753a8e92af5ec56599fa50c592c9430e1c3f8cc Mon Sep 17 00:00:00 2001
From: Mononaut
Date: Tue, 29 Aug 2023 21:20:36 +0900
Subject: [PATCH 55/62] Accelerator fee diagram concept
---
.../accelerate-fee-graph.component.html | 21 +
.../accelerate-fee-graph.component.scss | 147 +++++++
.../accelerate-fee-graph.component.ts | 96 ++++
.../accelerate-preview.component.html | 413 +++++++++---------
.../accelerate-preview.component.scss | 7 +
.../accelerate-preview.component.ts | 31 +-
.../transaction/transaction.component.html | 2 +-
frontend/src/app/shared/shared.module.ts | 3 +
8 files changed, 511 insertions(+), 209 deletions(-)
create mode 100644 frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.html
create mode 100644 frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss
create mode 100644 frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.ts
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.html b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.html
new file mode 100644
index 000000000..727f833bc
--- /dev/null
+++ b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+ {{ bar.label }}
+
+
+
+
+
+ {{ bar.class === 'tx' ? '' : '+' }} {{ bar.fee | number }} sat
+
+
+
+
+
+
+
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss
new file mode 100644
index 000000000..84d530e34
--- /dev/null
+++ b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss
@@ -0,0 +1,147 @@
+.fee-graph {
+ height: 100%;
+ width: 20%;
+ min-width: 100px;
+ max-width: 150px;
+ max-height: 100vh;
+ margin-left: 4em;
+ margin-right: 1.5em;
+ padding-bottom: 63px;
+
+ .column {
+ width: 100%;
+ height: 100%;
+ position: relative;
+ background: #181b2d;
+
+ .bar {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .fill {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ opacity: 0.75;
+ pointer-events: none;
+ }
+
+ .fee {
+ position: absolute;
+ opacity: 0;
+ pointer-events: none;
+ }
+
+ .line {
+ position: absolute;
+ right: 0;
+ top: 0;
+ left: -4.5em;
+ border-top: dashed white 1.5px;
+
+ .fee-rate {
+ width: 100%;
+ position: absolute;
+ left: 0;
+ right: 0.2em;
+ font-size: 0.8em;
+ display: flex;
+ flex-direction: row-reverse;
+ justify-content: space-between;
+ margin: 0;
+
+ .label {
+ margin-right: .2em;
+ }
+
+ .rate .symbol {
+ color: white;
+ }
+ }
+ }
+
+ &.tx {
+ .fill {
+ background: #105fb0;
+ }
+ .line {
+ .fee-rate {
+ top: 0;
+ }
+ }
+ .fee {
+ opacity: 1;
+ z-index: 11;
+ }
+ }
+
+ &.target {
+ .fill {
+ background: #3bcc49;
+ }
+ .fee {
+ opacity: 1;
+ z-index: 11;
+ }
+ .line .fee-rate {
+ bottom: 2px;
+ }
+ }
+
+ &.max {
+ cursor: pointer;
+ .line .fee-rate {
+ .label {
+ opacity: 0;
+ }
+ bottom: 2px;
+ }
+ &.active, &:hover {
+ .fill {
+ background: #653b9c;
+ }
+ .line {
+ .fee-rate .label {
+ opacity: 1;
+ }
+ }
+ }
+ }
+
+ &:hover {
+ .fill {
+ z-index: 10;
+ }
+ .line {
+ z-index: 11;
+ }
+ .fee {
+ opacity: 1;
+ z-index: 12;
+ }
+ }
+ }
+
+ &:hover > .bar:not(:hover) {
+ &.target, &.max {
+ .fee {
+ opacity: 0;
+ }
+ .line .fee-rate .label {
+ opacity: 0;
+ }
+ }
+ }
+ }
+
+ .vsize {
+ text-align: center;
+ }
+}
\ No newline at end of file
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.ts b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.ts
new file mode 100644
index 000000000..98b47bea0
--- /dev/null
+++ b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.ts
@@ -0,0 +1,96 @@
+import { Component, OnInit, Input, Output, OnChanges, EventEmitter, HostListener, Inject, LOCALE_ID } from '@angular/core';
+import { StateService } from '../../services/state.service';
+import { Outspend, Transaction, Vin, Vout } from '../../interfaces/electrs.interface';
+import { Router } from '@angular/router';
+import { ReplaySubject, merge, Subscription, of } from 'rxjs';
+import { tap, switchMap } from 'rxjs/operators';
+import { ApiService } from '../../services/api.service';
+import { AccelerationEstimate, RateOption } from './accelerate-preview.component';
+
+interface GraphBar {
+ rate: number;
+ style: any;
+ class: 'tx' | 'target' | 'max';
+ label: string;
+ active?: boolean;
+ rateIndex?: number;
+ fee?: number;
+}
+
+@Component({
+ selector: 'app-accelerate-fee-graph',
+ templateUrl: './accelerate-fee-graph.component.html',
+ styleUrls: ['./accelerate-fee-graph.component.scss'],
+})
+export class AccelerateFeeGraphComponent implements OnInit, OnChanges {
+ @Input() tx: Transaction;
+ @Input() estimate: AccelerationEstimate;
+ @Input() maxRateOptions: RateOption[] = [];
+ @Input() maxRateIndex: number = 0;
+ @Output() setUserBid = new EventEmitter<{ fee: number, index: number }>();
+
+ bars: GraphBar[] = [];
+ tooltipPosition = { x: 0, y: 0 };
+
+ ngOnInit(): void {
+ this.initGraph();
+ }
+
+ ngOnChanges(): void {
+ this.initGraph();
+ }
+
+ initGraph(): void {
+ if (!this.tx || !this.estimate) {
+ return;
+ }
+ const maxRate = Math.max(...this.maxRateOptions.map(option => option.rate));
+ const baseRate = this.estimate.txSummary.effectiveFee / this.estimate.txSummary.effectiveVsize;
+ const baseHeight = baseRate / maxRate;
+ const bars: GraphBar[] = this.maxRateOptions.slice().reverse().map(option => {
+ return {
+ rate: option.rate,
+ style: this.getStyle(option.rate, maxRate, baseHeight),
+ class: 'max',
+ label: 'max',
+ active: option.index === this.maxRateIndex,
+ rateIndex: option.index,
+ fee: option.fee,
+ }
+ });
+ bars.push({
+ rate: this.estimate.targetFeeRate,
+ style: this.getStyle(this.estimate.targetFeeRate, maxRate, baseHeight),
+ class: 'target',
+ label: 'expected',
+ fee: this.estimate.nextBlockFee - this.estimate.txSummary.effectiveFee
+ });
+ bars.push({
+ rate: baseRate,
+ style: this.getStyle(baseRate, maxRate, 0),
+ class: 'tx',
+ label: 'paid',
+ fee: this.estimate.txSummary.effectiveFee,
+ });
+ this.bars = bars;
+ }
+
+ getStyle(rate, maxRate, base) {
+ const top = (rate / maxRate);
+ return {
+ height: `${(top - base) * 100}%`,
+ bottom: base ? `${base * 100}%` : '0',
+ }
+ }
+
+ onClick(event, bar): void {
+ if (bar.rateIndex != null) {
+ this.setUserBid.emit({ fee: bar.fee, index: bar.rateIndex });
+ }
+ }
+
+ @HostListener('pointermove', ['$event'])
+ onPointerMove(event) {
+ this.tooltipPosition = { x: event.offsetX, y: event.offsetY };
+ }
+}
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
index c2bcbb7bf..ad96eb671 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
@@ -20,212 +20,223 @@
-
-
-
-
-
-
-
-
-
- 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.
-
-
-
-
-
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss
index 84d530e34..6137b53ee 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss
+++ b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.scss
@@ -1,9 +1,8 @@
.fee-graph {
height: 100%;
- width: 20%;
- min-width: 100px;
- max-width: 150px;
- max-height: 100vh;
+ min-width: 120px;
+ width: 120px;
+ max-height: 90vh;
margin-left: 4em;
margin-right: 1.5em;
padding-bottom: 63px;
@@ -20,6 +19,7 @@
left: 0;
right: 0;
display: flex;
+ flex-direction: column;
justify-content: center;
align-items: center;
@@ -34,11 +34,18 @@
}
.fee {
- position: absolute;
+ font-size: 0.9em;
opacity: 0;
pointer-events: none;
}
+ .spacer {
+ width: 100%;
+ height: 1px;
+ flex-grow: 1;
+ pointer-events: none;
+ }
+
.line {
position: absolute;
right: 0;
@@ -69,7 +76,7 @@
&.tx {
.fill {
- background: #105fb0;
+ background: #3bcc49;
}
.line {
.fee-rate {
@@ -77,6 +84,7 @@
}
}
.fee {
+ position: absolute;
opacity: 1;
z-index: 11;
}
@@ -84,9 +92,10 @@
&.target {
.fill {
- background: #3bcc49;
+ background: #653b9c;
}
.fee {
+ position: absolute;
opacity: 1;
z-index: 11;
}
@@ -105,7 +114,7 @@
}
&.active, &:hover {
.fill {
- background: #653b9c;
+ background: #105fb0;
}
.line {
.fee-rate .label {
@@ -138,10 +147,11 @@
opacity: 0;
}
}
+ &.max {
+ .fill {
+ background: none;
+ }
+ }
}
}
-
- .vsize {
- text-align: center;
- }
}
\ No newline at end of file
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.ts b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.ts
index 98b47bea0..4d746a0d9 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.ts
+++ b/frontend/src/app/components/accelerate-preview/accelerate-fee-graph.component.ts
@@ -52,7 +52,7 @@ export class AccelerateFeeGraphComponent implements OnInit, OnChanges {
rate: option.rate,
style: this.getStyle(option.rate, maxRate, baseHeight),
class: 'max',
- label: 'max',
+ label: 'maximum',
active: option.index === this.maxRateIndex,
rateIndex: option.index,
fee: option.fee,
@@ -62,14 +62,14 @@ export class AccelerateFeeGraphComponent implements OnInit, OnChanges {
rate: this.estimate.targetFeeRate,
style: this.getStyle(this.estimate.targetFeeRate, maxRate, baseHeight),
class: 'target',
- label: 'expected',
+ label: 'next block',
fee: this.estimate.nextBlockFee - this.estimate.txSummary.effectiveFee
});
bars.push({
rate: baseRate,
style: this.getStyle(baseRate, maxRate, 0),
class: 'tx',
- label: 'paid',
+ label: '',
fee: this.estimate.txSummary.effectiveFee,
});
this.bars = bars;
diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
index ad96eb671..8fc77dae4 100644
--- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
+++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.html
@@ -12,14 +12,6 @@
- 1">
-
-
- This transactions is part of a CPFP tree. Fee rates (in sats/vb) are provided for your information. Change in the CPFP tree will lead to different fee rates values.
-
-
-
-
-
+ Your transaction
+
+
+ Plus {{ estimate.txSummary.ancestorCount - 1 }} unconfirmed ancestor{{ estimate.txSummary.ancestorCount > 2 ? 's' : ''}}.
+
-
-
-
- Next block market price
+ |
+
+ Virtual size
|
-
- {{ estimate.targetFeeRate | number : '1.0-0' }} sat/vB
+ | |
+
+
+
+ Size in vbytes of this transaction and its unconfirmed ancestors
|
-
- Currently estimated fee to get into next block
+ |
+ In-band fees
|
-
-
- {{ estimate.nextBlockFee| number }} sats
-
-
+ |
+ {{ estimate.txSummary.effectiveFee | number : '1.0-0' }} 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
+ |
+
+ Fees already paid by this transaction and its unconfirmed ancestors
|
-
- How much more are you willing to pay at most to get into the next block?
+
+ How much more are you willing to pay?
- 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.
+ Choose the maximum extra transaction fee you're willing to pay to get into the next block.
+ If the estimated next block rate rises beyond this limit, we will automatically cancel your acceleration request.
| |