[accelerator] add missing getters etc
This commit is contained in:
		
							parent
							
								
									d3e3650cac
								
							
						
					
					
						commit
						6081daacef
					
				| @ -11,7 +11,7 @@ import { IAuth, AuthServiceMempool } from '../../services/auth.service'; | |||||||
| import { EnterpriseService } from '../../services/enterprise.service'; | import { EnterpriseService } from '../../services/enterprise.service'; | ||||||
| import { ApiService } from '../../services/api.service'; | import { ApiService } from '../../services/api.service'; | ||||||
| 
 | 
 | ||||||
| export type PaymentMethod = 'balance' | 'bitcoin' | 'cashapp'; | export type PaymentMethod = 'balance' | 'bitcoin' | 'cashapp' | 'applepay' | 'googlepay'; | ||||||
| 
 | 
 | ||||||
| export type AccelerationEstimate = { | export type AccelerationEstimate = { | ||||||
|   hasAccess: boolean; |   hasAccess: boolean; | ||||||
| @ -24,7 +24,7 @@ export type AccelerationEstimate = { | |||||||
|   mempoolBaseFee: number; |   mempoolBaseFee: number; | ||||||
|   vsizeFee: number; |   vsizeFee: number; | ||||||
|   pools: number[]; |   pools: number[]; | ||||||
|   availablePaymentMethods: {[method: string]: {min: number, max: number}}; |   availablePaymentMethods: Record<PaymentMethod, {min: number, max: number}>; | ||||||
|   unavailable?: boolean; |   unavailable?: boolean; | ||||||
|   options: { // recommended bid options
 |   options: { // recommended bid options
 | ||||||
|     fee: number; // recommended userBid in sats
 |     fee: number; // recommended userBid in sats
 | ||||||
| @ -512,6 +512,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy { | |||||||
|                 this.accelerationUUID |                 this.accelerationUUID | ||||||
|               ).subscribe({ |               ).subscribe({ | ||||||
|                 next: () => { |                 next: () => { | ||||||
|  |                   this.apiService.logAccelerationRequest$(this.tx.txid).subscribe(); | ||||||
|                   this.audioService.playSound('ascend-chime-cartoon'); |                   this.audioService.playSound('ascend-chime-cartoon'); | ||||||
|                   if (this.applePay) { |                   if (this.applePay) { | ||||||
|                     this.applePay.destroy(); |                     this.applePay.destroy(); | ||||||
| @ -601,6 +602,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy { | |||||||
|               this.accelerationUUID |               this.accelerationUUID | ||||||
|             ).subscribe({ |             ).subscribe({ | ||||||
|               next: () => { |               next: () => { | ||||||
|  |                 this.apiService.logAccelerationRequest$(this.tx.txid).subscribe(); | ||||||
|                 this.audioService.playSound('ascend-chime-cartoon'); |                 this.audioService.playSound('ascend-chime-cartoon'); | ||||||
|                 if (this.googlePay) { |                 if (this.googlePay) { | ||||||
|                   this.googlePay.destroy(); |                   this.googlePay.destroy(); | ||||||
| @ -790,7 +792,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   get couldPay() { |   get couldPay() { | ||||||
|     return this.couldPayWithBalance || this.couldPayWithBitcoin || this.couldPayWithCashapp || this.couldPayWithApplePay; |     return this.couldPayWithBalance || this.couldPayWithBitcoin || this.couldPayWithCashapp || this.couldPayWithApplePay || this.couldPayWithGooglePay; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   get canPayWithBitcoin() { |   get canPayWithBitcoin() { | ||||||
| @ -855,7 +857,7 @@ export class AccelerateCheckout implements OnInit, OnDestroy { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   get canPay() { |   get canPay() { | ||||||
|     return this.canPayWithBalance || this.canPayWithBitcoin || this.canPayWithCashapp || this.canPayWithApplePay; |     return this.canPayWithBalance || this.canPayWithBitcoin || this.canPayWithCashapp || this.canPayWithApplePay || this.canPayWithGooglePay; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   get hasAccessToBalanceMode() { |   get hasAccessToBalanceMode() { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user