diff --git a/src/CONST.ts b/src/CONST.ts index 15554719ca9d..0689a656f428 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -949,7 +949,14 @@ const CONST = { EMPLOYEE_TOUR_PRODUCTION: 'https://expensify.navattic.com/35609gb', EMPLOYEE_TOUR_STAGING: 'https://expensify.navattic.com/cf15002s', }, - + OLD_DOT_PUBLIC_URLS: { + TERMS_URL: `${EXPENSIFY_URL}/terms`, + PRIVACY_URL: `${EXPENSIFY_URL}/privacy`, + LICENSES_URL: `${USE_EXPENSIFY_URL}/licenses`, + ACH_TERMS_URL: `${EXPENSIFY_URL}/achterms`, + WALLET_AGREEMENT_URL: `${EXPENSIFY_URL}/expensify-payments-wallet-terms-of-service`, + BANCORP_WALLET_AGREEMENT_URL: `${EXPENSIFY_URL}/bancorp-bank-wallet-terms-of-service`, + }, OLDDOT_URLS: { ADMIN_POLICIES_URL: 'admin_policies', ADMIN_DOMAINS_URL: 'admin_domains', diff --git a/src/libs/actions/Link.ts b/src/libs/actions/Link.ts index 8d367c7eeec2..cee639f4c4a3 100644 --- a/src/libs/actions/Link.ts +++ b/src/libs/actions/Link.ts @@ -183,11 +183,9 @@ function openLink(href: string, environmentURL: string, isAttachment = false) { Navigation.navigate(internalNewExpensifyPath as Route); return; } - const OLD_DOT_PUBLIC_URLS: string[] = [CONST.TERMS_URL, CONST.PRIVACY_URL]; - // If we are handling an old dot Expensify link we need to open it with openOldDotLink() so we can navigate to it with the user already logged in. // As attachments also use expensify.com we don't want it working the same as links. - const isPublicOldDotURL = OLD_DOT_PUBLIC_URLS.includes(href); + const isPublicOldDotURL = (Object.values(CONST.OLD_DOT_PUBLIC_URLS) as string[]).includes(href); if (internalExpensifyPath && !isAttachment && !isPublicOldDotURL) { openOldDotLink(internalExpensifyPath); return;