[accelerator] reset cashapp upon price update

This commit is contained in:
nymkappa 2024-04-08 21:55:47 +09:00
parent d7a4a95c05
commit 88de5412f8
No known key found for this signature in database
GPG Key ID: 92358FC85D9645DE

View File

@ -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',