[accelerator] remove tx restriction for cashapp payments

This commit is contained in:
nymkappa 2025-01-11 18:31:45 +09:00
parent c3686a5500
commit 21cdb7e3a1
No known key found for this signature in database
GPG Key ID: 92358FC85D9645DE
5 changed files with 2 additions and 17 deletions

View File

@ -62,7 +62,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
@Input() miningStats: MiningStats;
@Input() eta: ETA;
@Input() scrollEvent: boolean;
@Input() cashappEnabled: boolean = true;
@Input() applePayEnabled: boolean = false;
@Input() googlePayEnabled: boolean = true;
@Input() advancedEnabled: boolean = false;
@ -217,7 +216,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
this.loadingBtcpayInvoice = true;
this.invoice = null;
this.requestBTCPayInvoice();
} else if (this._step === 'cashapp' && this.cashappEnabled) {
} else if (this._step === 'cashapp') {
this.loadingCashapp = true;
this.setupSquare();
this.scrollToElementWithTimeout('confirm-title', 'center', 100);
@ -828,9 +827,6 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
}
get couldPayWithCashapp(): boolean {
if (!this.cashappEnabled) {
return false;
}
return !!this.estimate?.availablePaymentMethods?.cashapp;
}
@ -865,7 +861,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
}
get canPayWithCashapp(): boolean {
if (!this.cashappEnabled || !this.conversions || (!this.isProdDomain && !isDevMode())) {
if (!this.conversions || (!this.isProdDomain && !isDevMode())) {
return false;
}

View File

@ -124,7 +124,6 @@
<ng-container *ngIf="(ETA$ | async) as eta;">
<app-accelerate-checkout
*ngIf="(da$ | async) as da;"
[cashappEnabled]="cashappEligible"
[advancedEnabled]="false"
[forceMobile]="true"
[tx]="tx"

View File

@ -756,10 +756,6 @@ export class TrackerComponent implements OnInit, OnDestroy {
}
}
get cashappEligible(): boolean {
return this.mempoolPosition?.block > 0 && this.tx.weight < 4000;
}
get showAccelerationSummary(): boolean {
return (
this.tx

View File

@ -138,7 +138,6 @@
<app-accelerate-checkout
*ngIf="(da$ | async) as da;"
[cashappEnabled]="cashappEligible"
[advancedEnabled]="true"
[tx]="tx"
[accelerating]="isAcceleration"

View File

@ -156,7 +156,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
showAccelerationDetails = false;
hasAccelerationDetails = false;
scrollIntoAccelPreview = false;
cashappEligible = false;
auditEnabled: boolean = this.stateService.env.AUDIT && this.stateService.env.BASE_MODULE === 'mempool' && this.stateService.env.MINING_DASHBOARD === true;
isMempoolSpaceBuild = this.stateService.isMempoolSpaceBuild;
@ -528,9 +527,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.miningStats = stats;
});
}
if (txPosition.position?.block > 0 && this.tx.weight < 4000) {
this.cashappEligible = true;
}
if (!this.gotInitialPosition && txPosition.position?.block === 0 && txPosition.position?.vsize < 750_000) {
this.accelerationFlowCompleted = true;
}
@ -1036,7 +1032,6 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.showAccelerationDetails = false;
this.accelerationFlowCompleted = false;
this.accelerationInfo = null;
this.cashappEligible = false;
this.txInBlockIndex = null;
this.mempoolPosition = null;
this.pool = null;