Revert "Disable accelerate button after submission"
This reverts commit e55b1740db5d5d2ba9a15d201400abdad08787e7.
This commit is contained in:
		
							parent
							
								
									317b1b6ac5
								
							
						
					
					
						commit
						73f241e9c3
					
				| @ -26,7 +26,7 @@ | |||||||
|   </ng-container> |   </ng-container> | ||||||
| 
 | 
 | ||||||
|   <ng-container *ngIf="estimate else loadingEstimate"> |   <ng-container *ngIf="estimate else loadingEstimate"> | ||||||
|     <div [class]="{estimateDisabled: error || processing || showSuccess }"> |     <div [class]="{estimateDisabled: error}"> | ||||||
| 
 | 
 | ||||||
|       <div *ngIf="user && !estimate.hasAccess"> |       <div *ngIf="user && !estimate.hasAccess"> | ||||||
|         <div class="alert alert-mempool">You are currently on the waitlist</div> |         <div class="alert alert-mempool">You are currently on the waitlist</div> | ||||||
| @ -286,7 +286,7 @@ | |||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
| 
 | 
 | ||||||
|       @if (!hideCashApp && !(error || processing || showSuccess) && paymentType === 'cashapp') { |       @if (!hideCashApp && paymentType === 'cashapp') { | ||||||
|         <div #cashappCTA class="cashapp-placeholder {{ stickyCTA }}"></div> |         <div #cashappCTA class="cashapp-placeholder {{ stickyCTA }}"></div> | ||||||
|         <div class="d-flex justify-content-center align-items-center cashapp-cta {{ stickyCTA }}" (click)="submitCashappPay()"> |         <div class="d-flex justify-content-center align-items-center cashapp-cta {{ stickyCTA }}" (click)="submitCashappPay()"> | ||||||
|           <div [style]="showSpinner ? 'opacity: 0' : 'opacity: 1'" class="p-2">Accelerate for <app-fiat [value]="maxCost" [colorClass]="estimate.userBalance < maxCost ? 'red-color' : 'green-color'"></app-fiat> with</div> |           <div [style]="showSpinner ? 'opacity: 0' : 'opacity: 1'" class="p-2">Accelerate for <app-fiat [value]="maxCost" [colorClass]="estimate.userBalance < maxCost ? 'red-color' : 'green-color'"></app-fiat> with</div> | ||||||
|  | |||||||
| @ -48,7 +48,6 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges | |||||||
| 
 | 
 | ||||||
|   math = Math; |   math = Math; | ||||||
|   error = ''; |   error = ''; | ||||||
|   processing = false; |  | ||||||
|   showSuccess = false; |   showSuccess = false; | ||||||
|   estimateSubscription: Subscription; |   estimateSubscription: Subscription; | ||||||
|   accelerationSubscription: Subscription; |   accelerationSubscription: Subscription; | ||||||
| @ -246,21 +245,18 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges | |||||||
|     if (this.accelerationSubscription) { |     if (this.accelerationSubscription) { | ||||||
|       this.accelerationSubscription.unsubscribe(); |       this.accelerationSubscription.unsubscribe(); | ||||||
|     } |     } | ||||||
|     this.processing = true; |  | ||||||
|     this.accelerationSubscription = this.servicesApiService.accelerate$( |     this.accelerationSubscription = this.servicesApiService.accelerate$( | ||||||
|       this.tx.txid, |       this.tx.txid, | ||||||
|       this.userBid, |       this.userBid, | ||||||
|       this.accelerationUUID |       this.accelerationUUID | ||||||
|     ).subscribe({ |     ).subscribe({ | ||||||
|       next: () => { |       next: () => { | ||||||
|         this.processing = false; |  | ||||||
|         this.audioService.playSound('ascend-chime-cartoon'); |         this.audioService.playSound('ascend-chime-cartoon'); | ||||||
|         this.showSuccess = true; |         this.showSuccess = true; | ||||||
|         this.scrollToPreviewWithTimeout('successAlert', 'center'); |         this.scrollToPreviewWithTimeout('successAlert', 'center'); | ||||||
|         this.estimateSubscription.unsubscribe(); |         this.estimateSubscription.unsubscribe(); | ||||||
|       }, |       }, | ||||||
|       error: (response) => { |       error: (response) => { | ||||||
|         this.processing = false; |  | ||||||
|         if (response.status === 403 && response.error === 'not_available') { |         if (response.status === 403 && response.error === 'not_available') { | ||||||
|           this.error = 'waitlisted'; |           this.error = 'waitlisted'; | ||||||
|         } else { |         } else { | ||||||
| @ -363,14 +359,12 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges | |||||||
|               that.accelerationUUID |               that.accelerationUUID | ||||||
|             ).subscribe({ |             ).subscribe({ | ||||||
|               next: () => { |               next: () => { | ||||||
|                 this.processing = false; |  | ||||||
|                 that.audioService.playSound('ascend-chime-cartoon'); |                 that.audioService.playSound('ascend-chime-cartoon'); | ||||||
|                 that.showSuccess = true; |                 that.showSuccess = true; | ||||||
|                 that.scrollToPreviewWithTimeout('successAlert', 'center'); |                 that.scrollToPreviewWithTimeout('successAlert', 'center'); | ||||||
|                 that.estimateSubscription.unsubscribe(); |                 that.estimateSubscription.unsubscribe(); | ||||||
|               }, |               }, | ||||||
|               error: (response) => { |               error: (response) => { | ||||||
|                 this.processing = false; |  | ||||||
|                 if (response.status === 403 && response.error === 'not_available') { |                 if (response.status === 403 && response.error === 'not_available') { | ||||||
|                   that.error = 'waitlisted'; |                   that.error = 'waitlisted'; | ||||||
|                 } else { |                 } else { | ||||||
| @ -407,7 +401,6 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges | |||||||
|   submitCashappPay(): void { |   submitCashappPay(): void { | ||||||
|     if (this.cashappSubmit) { |     if (this.cashappSubmit) { | ||||||
|       this.cashappSubmit?.begin(); |       this.cashappSubmit?.begin(); | ||||||
|       this.processing = true; |  | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user