1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

Check FF before validating payment component (#14840)

This commit is contained in:
Alex Morask
2025-05-20 09:15:01 -04:00
committed by GitHub
parent 83c4438efe
commit 13c8e26003

View File

@@ -117,9 +117,15 @@ export class SetupComponent implements OnInit, OnDestroy {
submit = async () => {
try {
const requireProviderPaymentMethodDuringSetup = await firstValueFrom(
this.requireProviderPaymentMethodDuringSetup$,
);
this.formGroup.markAllAsTouched();
const paymentValid = this.paymentComponent.validate();
const paymentValid = requireProviderPaymentMethodDuringSetup
? this.paymentComponent.validate()
: true;
const taxInformationValid = this.taxInformationComponent.validate();
if (!paymentValid || !taxInformationValid || !this.formGroup.valid) {
@@ -146,10 +152,6 @@ export class SetupComponent implements OnInit, OnDestroy {
request.taxInfo.city = taxInformation.city;
request.taxInfo.state = taxInformation.state;
const requireProviderPaymentMethodDuringSetup = await firstValueFrom(
this.requireProviderPaymentMethodDuringSetup$,
);
if (requireProviderPaymentMethodDuringSetup) {
request.paymentSource = await this.paymentComponent.tokenize();
}