[accel preview] only show waitlist message if logged in

This commit is contained in:
nymkappa 2023-12-04 23:23:51 +09:00
parent 025788e78c
commit 4da5910e0b
No known key found for this signature in database
GPG key ID: E155910B16E8BD04
2 changed files with 5 additions and 2 deletions

View file

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

View file

@ -56,6 +56,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
userBid = 0;
selectFeeRateIndex = 1;
isMobile: boolean = window.innerWidth <= 767.98;
user: any = undefined;
maxRateOptions: RateOption[] = [];
@ -78,6 +79,8 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
}
ngOnInit() {
this.user = this.storageService.getAuth()?.user ?? null;
this.estimateSubscription = this.apiService.estimate$(this.tx.txid).pipe(
tap((response) => {
if (response.status === 204) {