From 88de5412f8afdd676fe1a770a8e007a7e1762bcc Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Mon, 8 Apr 2024 21:55:47 +0900 Subject: [PATCH] [accelerator] reset cashapp upon price update --- .../accelerate-preview/accelerate-preview.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts index ec510b31a..e85ebb9e6 100644 --- a/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts +++ b/frontend/src/app/components/accelerate-preview/accelerate-preview.component.ts @@ -318,6 +318,10 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges this.conversionsSubscription = this.stateService.conversions$.subscribe( async (conversions) => { + if (this.cashAppPay) { + this.cashAppPay.destroy(); + } + const maxCostUsd = this.maxCost / 100_000_000 * conversions.USD; const paymentRequest = this.payments.paymentRequest({ countryCode: 'US',