[accelerator] remove "coming soon" button state
This commit is contained in:
		
							parent
							
								
									5bb3e930cc
								
							
						
					
					
						commit
						9ad6b925c8
					
				@ -552,22 +552,15 @@
 | 
				
			|||||||
<ng-template #accelerateTo let-x i18n="accelerator.accelerate-to-x">Accelerate to ~{{ x | number : '1.0-0' }} sat/vB</ng-template>
 | 
					<ng-template #accelerateTo let-x i18n="accelerator.accelerate-to-x">Accelerate to ~{{ x | number : '1.0-0' }} sat/vB</ng-template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<ng-template #accelerateButton>
 | 
					<ng-template #accelerateButton>
 | 
				
			||||||
  @if (!couldPay && !quoteError && !(estimate?.availablePaymentMethods.bitcoin || estimate?.availablePaymentMethods.balance)) {
 | 
					  <div class="position-relative">
 | 
				
			||||||
    <button type="button" class="mt-1 btn btn-purple rounded-pill align-self-center d-flex flex-row justify-content-center align-items-center disabled" style="width: 200px">
 | 
					    <button type="button" class="mt-1 btn btn-purple rounded-pill align-self-center d-flex flex-row justify-content-center align-items-center" [class.disabled]="!canPay || quoteError || cantPayReason || calculating || (!advancedEnabled && selectedOption !== 'accel')" style="width: 200px" (click)="moveToStep('checkout')">
 | 
				
			||||||
      <img src="/resources/mempool-accelerator-sparkles-light.svg" height="20" class="mr-2" style="margin-left: -10px">
 | 
					      <img src="/resources/mempool-accelerator-sparkles-light.svg" height="20" class="mr-2" style="margin-left: -10px">
 | 
				
			||||||
      <span>Coming soon</span>
 | 
					      <span i18n="transaction.accelerate|Accelerate button label">Accelerate</span>
 | 
				
			||||||
    </button>
 | 
					    </button>
 | 
				
			||||||
  } @else {
 | 
					    @if (quoteError || cantPayReason) {
 | 
				
			||||||
    <div class="position-relative">
 | 
					      <div class="btn-error-wrapper"><span class="btn-error"><app-mempool-error [error]="quoteError || cantPayReason" [textOnly]="true" alertClass=""></app-mempool-error></span></div>
 | 
				
			||||||
      <button type="button" class="mt-1 btn btn-purple rounded-pill align-self-center d-flex flex-row justify-content-center align-items-center" [class.disabled]="!canPay || quoteError || cantPayReason || calculating || (!advancedEnabled && selectedOption !== 'accel')" style="width: 200px" (click)="moveToStep('checkout')">
 | 
					    }
 | 
				
			||||||
        <img src="/resources/mempool-accelerator-sparkles-light.svg" height="20" class="mr-2" style="margin-left: -10px">
 | 
					  </div>
 | 
				
			||||||
        <span i18n="transaction.accelerate|Accelerate button label">Accelerate</span>
 | 
					 | 
				
			||||||
      </button>
 | 
					 | 
				
			||||||
      @if (quoteError || cantPayReason) {
 | 
					 | 
				
			||||||
        <div class="btn-error-wrapper"><span class="btn-error"><app-mempool-error [error]="quoteError || cantPayReason" [textOnly]="true" alertClass=""></app-mempool-error></span></div>
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
</ng-template>
 | 
					</ng-template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<ng-template #accountPayButton>
 | 
					<ng-template #accountPayButton>
 | 
				
			||||||
 | 
				
			|||||||
@ -297,6 +297,14 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
          this.validateChoice();
 | 
					          this.validateChoice();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if (!this.couldPay) {
 | 
				
			||||||
 | 
					            this.quoteError = `cannot_accelerate_tx`;
 | 
				
			||||||
 | 
					            if (this.step === 'summary') {
 | 
				
			||||||
 | 
					              this.unavailable.emit(true);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          if (this.step === 'checkout' && this.canPayWithBitcoin && !this.loadingBtcpayInvoice) {
 | 
					          if (this.step === 'checkout' && this.canPayWithBitcoin && !this.loadingBtcpayInvoice) {
 | 
				
			||||||
            this.loadingBtcpayInvoice = true;
 | 
					            this.loadingBtcpayInvoice = true;
 | 
				
			||||||
            this.requestBTCPayInvoice();
 | 
					            this.requestBTCPayInvoice();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user