Merge pull request #4448 from mempool/nymkappa/accel-preview-logged-in

[accelerator] show wait list message in preview when logged in with no access
This commit is contained in:
softsimon 2023-12-01 18:37:05 +09:00 committed by GitHub
commit 62c9a88235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -27,6 +27,11 @@
<ng-container *ngIf="estimate">
<div [class]="{estimateDisabled: error}">
<div *ngIf="!estimate.hasAccess">
<div class="alert alert-mempool">You are currently on the wait list</div>
</div>
<h5>Your transaction</h5>
<div class="row">
<div class="col">
@ -230,7 +235,7 @@
<div class="row mb-3" *ngIf="isLoggedIn()">
<div class="col">
<div class="d-flex justify-content-end">
<div class="d-flex justify-content-end" *ngIf="estimate.hasAccess">
<button class="btn btn-sm btn-primary btn-success" style="width: 150px" (click)="accelerate()">Accelerate</button>
</div>
</div>

View File

@ -93,7 +93,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
this.estimateSubscription.unsubscribe();
}
if (this.estimate.userBalance <= 0) {
if (this.estimate.hasAccess === true && this.estimate.userBalance <= 0) {
if (this.isLoggedIn()) {
this.error = `not_enough_balance`;
this.scrollToPreviewWithTimeout('mempoolError', 'center');