Compare commits

...

13 Commits

Author SHA1 Message Date
hunicus
b115214119 Show all mined transactions in acc widget 2024-07-11 22:28:11 +09:00
wiz
5bb3e930cc Merge pull request #5313 from mempool/mononaut/enable-cashapp
[accelerator] enable cashapp
2024-07-11 20:28:43 +09:00
wiz
347bddc974 Merge pull request #5315 from mempool/hunicus/faq-update-accelerate
Update faq
2024-07-11 20:28:16 +09:00
hunicus
4eca8240db Update accelerator faq mention for public availability 2024-07-11 18:18:13 +09:00
Mononaut
1c135b4c67 [accelerator] enable cashapp 2024-07-11 07:56:15 +00:00
softsimon
f24223ca06 Merge pull request #5312 from mempool/mononaut/fix-enterprise-import
Fix broken enterpriseService import
2024-07-11 15:06:28 +09:00
Mononaut
9748aa05cf Fix broken enterpriseService import 2024-07-11 05:59:29 +00:00
wiz
1a5613bf65 Merge pull request #5311 from mempool/natsoni/accel-tx-fee-update
Update tx acceleration state on confirmation
2024-07-11 14:50:06 +09:00
wiz
e55e4e378a Merge pull request #5310 from mempool/mononaut/acc-goal
accelerator goals
2024-07-11 01:21:15 +09:00
Mononaut
927eb98072 accelerator goals 2024-07-10 16:18:13 +00:00
natsoni
bbff50527b Don't show Accelerated on tx just mined by non-participating pool 2024-07-10 23:23:40 +09:00
natsoni
4470461a98 Add retry logic to acceleration data fetching on tx page 2024-07-10 23:22:57 +09:00
natsoni
645fd98c30 Show actual accelerated fee rate on newly mined tracked tx 2024-07-10 23:21:53 +09:00
10 changed files with 38 additions and 20 deletions

View File

@@ -8,6 +8,7 @@ import { ETA, EtaService } from '../../services/eta.service';
import { Transaction } from '../../interfaces/electrs.interface';
import { MiningStats } from '../../services/mining.service';
import { IAuth, AuthServiceMempool } from '../../services/auth.service';
import { EnterpriseService } from '../../services/enterprise.service';
export type PaymentMethod = 'balance' | 'bitcoin' | 'cashapp';
@@ -126,7 +127,8 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
private etaService: EtaService,
private audioService: AudioService,
private cd: ChangeDetectorRef,
private authService: AuthServiceMempool
private authService: AuthServiceMempool,
private enterpriseService: EnterpriseService,
) {
this.accelerationUUID = window.crypto.randomUUID();
}
@@ -198,6 +200,9 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
if (!this.estimate && ['quote', 'summary', 'checkout'].includes(this.step)) {
this.fetchEstimate();
}
if (this._step === 'checkout') {
this.enterpriseService.goal(8);
}
if (this._step === 'checkout' && this.canPayWithBitcoin) {
this.btcpayInvoiceFailed = false;
this.loadingBtcpayInvoice = true;
@@ -546,7 +551,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
}
get couldPayWithCashapp() {
if (!this.cashappEnabled || this.stateService.referrer !== 'https://cash.app/') {
if (!this.cashappEnabled) {
return false;
}
return !!this.estimate?.availablePaymentMethods?.cashapp;
@@ -569,7 +574,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
}
get canPayWithCashapp() {
if (!this.cashappEnabled || !this.conversions || this.stateService.referrer !== 'https://cash.app/') {
if (!this.cashappEnabled || !this.conversions) {
return false;
}

View File

@@ -20,7 +20,11 @@
min-height: auto;
}
}
.container-lg.widget-container {
@media (max-width: 500px) {
padding: 0;
}
}
.container {
max-width: 100%;
}
@@ -90,7 +94,7 @@ tr, td, th {
.widget {
.txid {
width: 30%;
width: 35%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -137,7 +141,7 @@ tr, td, th {
}
.status {
width: 20%
width: 115px
}
}

View File

@@ -137,4 +137,4 @@ export class AccelerationsListComponent implements OnInit, OnDestroy {
this.paramSubscription?.unsubscribe();
this.keyNavigationSubscription?.unsubscribe();
}
}
}

View File

@@ -102,7 +102,7 @@
<span>&nbsp;</span>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: 'text-top'; font-size: 13px; color: var(--title-fg)"></fa-icon>
</a>
<app-accelerations-list [attr.data-cy]="'recent-accelerations'" [widget]=true [accelerations$]="minedAccelerations$"></app-accelerations-list>
<app-accelerations-list [attr.data-cy]="'recent-accelerations'" [widget]=true [accelerations$]="accelerations$"></app-accelerations-list>
</div>
</div>
</div>

View File

@@ -75,9 +75,6 @@
} @else {
<app-time kind="until" [time]="eta.time" [fastRender]="false" [fixedRender]="true"></app-time>
}
<!-- @if (!showAccelerationSummary && isMobile && !tx.acceleration && acceleratorAvailable && accelerateCtaType === 'button' && !tx?.acceleration) {
<a class="btn btn-sm accelerate btn-small-height" i18n="transaction.accelerate|Accelerate button label" (click)="onAccelerateClicked()">Accelerate</a>
} -->
</span>
</ng-container>
<ng-template #etaSkeleton>

View File

@@ -728,7 +728,6 @@ export class TrackerComponent implements OnInit, OnDestroy {
if (!this.txId) {
return;
}
this.enterpriseService.goal(8);
this.accelerationFlowCompleted = false;
if (this.showAccelerationSummary) {
this.scrollIntoAccelPreview = true;

View File

@@ -639,7 +639,7 @@
}
<td>
<div class="effective-fee-container">
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize)) {
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize || tx.acceleration)) {
<app-fee-rate [fee]="accelerationInfo.acceleratedFeeRate"></app-fee-rate>
} @else {
<app-fee-rate [fee]="tx.effectiveFeePerVsize"></app-fee-rate>

View File

@@ -132,6 +132,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
tooltipPosition: { x: number, y: number };
isMobile: boolean;
firstLoad = true;
waitingForAccelerationInfo: boolean = false;
featuresEnabled: boolean;
segwitEnabled: boolean;
@@ -317,11 +318,19 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.setIsAccelerated();
}),
switchMap((blockHeight: number) => {
return this.servicesApiService.getAccelerationHistory$({ blockHeight });
return this.servicesApiService.getAccelerationHistory$({ blockHeight }).pipe(
switchMap((accelerationHistory: Acceleration[]) => {
if (this.tx.acceleration && !accelerationHistory.length) { // If the just mined transaction was accelerated, but services backend did not return any acceleration data, retry
return throwError('retry');
}
return of(accelerationHistory);
}),
retry({ count: 3, delay: 2000 }),
catchError(() => {
return of([]);
})
);
}),
catchError(() => {
return of([]);
})
).subscribe((accelerationHistory) => {
for (const acceleration of accelerationHistory) {
if (acceleration.txid === this.txId && (acceleration.status === 'completed' || acceleration.status === 'completed_provisional')) {
@@ -330,6 +339,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
acceleration.boost = boostCost;
this.tx.acceleratedAt = acceleration.added;
this.accelerationInfo = acceleration;
this.waitingForAccelerationInfo = false;
this.setIsAccelerated();
}
}
@@ -608,6 +618,9 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.stateService.txConfirmed$.subscribe(([txConfirmed, block]) => {
if (txConfirmed && this.tx && !this.tx.status.confirmed && txConfirmed === this.tx.txid) {
if (this.tx.acceleration) {
this.waitingForAccelerationInfo = true;
}
this.tx.status = {
confirmed: true,
block_height: block.height,
@@ -725,7 +738,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
}
document.location.hash = '#accelerate';
this.enterpriseService.goal(8);
this.openAccelerator();
this.scrollIntoAccelPreview = true;
return false;
@@ -804,7 +816,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
}
setIsAccelerated(initialState: boolean = false) {
this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
this.isAcceleration = ((this.tx.acceleration && (!this.tx.status.confirmed || this.waitingForAccelerationInfo)) || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
if (this.isAcceleration) {
if (initialState) {
this.accelerationFlowCompleted = true;

View File

@@ -194,7 +194,7 @@
</ng-template>
<ng-template type="how-to-get-transaction-confirmed-quickly">
<p>To get your transaction confirmed quicker, you will need to increase its effective feerate.</p><p>If your transaction was created with RBF enabled, your stuck transaction can simply be replaced with a new one that has a higher fee. Otherwise, if you control any of the stuck transaction's outputs, you can use CPFP to increase your stuck transaction's effective feerate.</p><p>If you are not sure how to do RBF or CPFP, work with the tool you used to make the transaction (wallet software, exchange company, etc).</p><p *ngIf="officialMempoolInstance">Another option to get your transaction confirmed more quickly is Mempool Accelerator™. This service is still in development, but you can <a href="https://mempool.space/accelerator">sign up for the waitlist</a> to be notified when it's ready.</p>
<p>To get your transaction confirmed quicker, you will need to increase its effective feerate.</p><p>If your transaction was created with RBF enabled, your stuck transaction can simply be replaced with a new one that has a higher fee. Otherwise, if you control any of the stuck transaction's outputs, you can use CPFP to increase your stuck transaction's effective feerate.</p><p>If you are not sure how to do RBF or CPFP, work with the tool you used to make the transaction (wallet software, exchange company, etc).</p><p>Another option to get your transaction confirmed more quickly is <a [href]="[ isMempoolSpaceBuild ? '/accelerator' : 'https://mempool.space/accelerator']" [target]="isMempoolSpaceBuild ? '' : 'blank'">Mempool Accelerator™</a>.</p>
</ng-template>
<ng-template type="how-prevent-stuck-transaction">

View File

@@ -33,6 +33,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
showMobileEnterpriseUpsell: boolean = true;
timeLtrSubscription: Subscription;
timeLtr: boolean = this.stateService.timeLtr.value;
isMempoolSpaceBuild = this.stateService.isMempoolSpaceBuild;
@ViewChildren(FaqTemplateDirective) faqTemplates: QueryList<FaqTemplateDirective>;
dict = {};