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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user