diff --git a/src/libs/BankAccountUtils.ts b/src/libs/BankAccountUtils.ts index 7088b01f83f9..c781ccab3f33 100644 --- a/src/libs/BankAccountUtils.ts +++ b/src/libs/BankAccountUtils.ts @@ -1,10 +1,9 @@ +import {Str} from 'expensify-common'; import type {OnyxEntry} from 'react-native-onyx'; import type * as OnyxTypes from '@src/types/onyx'; -// eslint-disable-next-line @typescript-eslint/no-unused-vars function getDefaultCompanyWebsite(session: OnyxEntry, user: OnyxEntry): string { - // temporarily always return https:// to fix https://github.com/Expensify/App/issues/47227 until https://github.com/Expensify/App/issues/45278 is resolved. - return 'https://'; + return user?.isFromPublicDomain ? 'https://' : `https://www.${Str.extractEmailDomain(session?.email ?? '')}`; } function getLastFourDigits(bankAccountNumber: string): string {