[accelerator] fee delta matches what the user accepted to pay in frontend
This commit is contained in:
		
							parent
							
								
									24ec31acd9
								
							
						
					
					
						commit
						933a204462
					
				@ -525,7 +525,8 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
 | 
				
			|||||||
                tokenResult.token,
 | 
					                tokenResult.token,
 | 
				
			||||||
                cardTag,
 | 
					                cardTag,
 | 
				
			||||||
                `accelerator-${this.tx.txid.substring(0, 15)}-${Math.round(new Date().getTime() / 1000)}`,
 | 
					                `accelerator-${this.tx.txid.substring(0, 15)}-${Math.round(new Date().getTime() / 1000)}`,
 | 
				
			||||||
                this.accelerationUUID
 | 
					                this.accelerationUUID,
 | 
				
			||||||
 | 
					                costUSD
 | 
				
			||||||
              ).subscribe({
 | 
					              ).subscribe({
 | 
				
			||||||
                next: () => {
 | 
					                next: () => {
 | 
				
			||||||
                  this.processing = false;
 | 
					                  this.processing = false;
 | 
				
			||||||
@ -624,7 +625,8 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
 | 
				
			|||||||
              tokenResult.token,
 | 
					              tokenResult.token,
 | 
				
			||||||
              cardTag,
 | 
					              cardTag,
 | 
				
			||||||
              `accelerator-${this.tx.txid.substring(0, 15)}-${Math.round(new Date().getTime() / 1000)}`,
 | 
					              `accelerator-${this.tx.txid.substring(0, 15)}-${Math.round(new Date().getTime() / 1000)}`,
 | 
				
			||||||
              this.accelerationUUID
 | 
					              this.accelerationUUID,
 | 
				
			||||||
 | 
					              costUSD
 | 
				
			||||||
            ).subscribe({
 | 
					            ).subscribe({
 | 
				
			||||||
              next: () => {
 | 
					              next: () => {
 | 
				
			||||||
                this.processing = false;
 | 
					                this.processing = false;
 | 
				
			||||||
@ -714,7 +716,8 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
 | 
				
			|||||||
              tokenResult.token,
 | 
					              tokenResult.token,
 | 
				
			||||||
              tokenResult.details.cashAppPay.cashtag,
 | 
					              tokenResult.details.cashAppPay.cashtag,
 | 
				
			||||||
              tokenResult.details.cashAppPay.referenceId,
 | 
					              tokenResult.details.cashAppPay.referenceId,
 | 
				
			||||||
              this.accelerationUUID
 | 
					              this.accelerationUUID,
 | 
				
			||||||
 | 
					              costUSD
 | 
				
			||||||
            ).subscribe({
 | 
					            ).subscribe({
 | 
				
			||||||
              next: () => {
 | 
					              next: () => {
 | 
				
			||||||
                this.processing = false;
 | 
					                this.processing = false;
 | 
				
			||||||
 | 
				
			|||||||
@ -135,16 +135,16 @@ export class ServicesApiServices {
 | 
				
			|||||||
    return this.httpClient.post<any>(`${this.stateService.env.SERVICES_API}/accelerator/accelerate`, { txInput: txInput, userBid: userBid, accelerationUUID: accelerationUUID });
 | 
					    return this.httpClient.post<any>(`${this.stateService.env.SERVICES_API}/accelerator/accelerate`, { txInput: txInput, userBid: userBid, accelerationUUID: accelerationUUID });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  accelerateWithCashApp$(txInput: string, token: string, cashtag: string, referenceId: string, accelerationUUID: string) {
 | 
					  accelerateWithCashApp$(txInput: string, token: string, cashtag: string, referenceId: string, accelerationUUID: string, userApprovedUSD: number) {
 | 
				
			||||||
    return this.httpClient.post<any>(`${this.stateService.env.SERVICES_API}/accelerator/accelerate/cashapp`, { txInput: txInput, token: token, cashtag: cashtag, referenceId: referenceId, accelerationUUID: accelerationUUID });
 | 
					    return this.httpClient.post<any>(`${this.stateService.env.SERVICES_API}/accelerator/accelerate/cashapp`, { txInput: txInput, token: token, cashtag: cashtag, referenceId: referenceId, accelerationUUID: accelerationUUID, userApprovedUSD: userApprovedUSD });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  accelerateWithApplePay$(txInput: string, token: string, cardTag: string, referenceId: string, accelerationUUID: string) {
 | 
					  accelerateWithApplePay$(txInput: string, token: string, cardTag: string, referenceId: string, accelerationUUID: string, userApprovedUSD: number) {
 | 
				
			||||||
    return this.httpClient.post<any>(`${this.stateService.env.SERVICES_API}/accelerator/accelerate/applePay`, { txInput: txInput, cardTag: cardTag, token: token, referenceId: referenceId, accelerationUUID: accelerationUUID });
 | 
					    return this.httpClient.post<any>(`${this.stateService.env.SERVICES_API}/accelerator/accelerate/applePay`, { txInput: txInput, cardTag: cardTag, token: token, referenceId: referenceId, accelerationUUID: accelerationUUID, userApprovedUSD: userApprovedUSD });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  accelerateWithGooglePay$(txInput: string, token: string, cardTag: string, referenceId: string, accelerationUUID: string) {
 | 
					  accelerateWithGooglePay$(txInput: string, token: string, cardTag: string, referenceId: string, accelerationUUID: string, userApprovedUSD: number) {
 | 
				
			||||||
    return this.httpClient.post<any>(`${this.stateService.env.SERVICES_API}/accelerator/accelerate/googlePay`, { txInput: txInput, cardTag: cardTag, token: token, referenceId: referenceId, accelerationUUID: accelerationUUID });
 | 
					    return this.httpClient.post<any>(`${this.stateService.env.SERVICES_API}/accelerator/accelerate/googlePay`, { txInput: txInput, cardTag: cardTag, token: token, referenceId: referenceId, accelerationUUID: accelerationUUID, userApprovedUSD: userApprovedUSD });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  getAccelerations$(): Observable<Acceleration[]> {
 | 
					  getAccelerations$(): Observable<Acceleration[]> {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user