From 9013bad3ff184038a0c208fe6b31649b39e48ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Oliv=C3=A9?= Date: Mon, 27 Feb 2023 12:21:43 +0100 Subject: [PATCH 1/3] Added code fencing in info tab component --- ui/helpers/constants/common.ts | 6 ++ .../settings/info-tab/info-tab.component.js | 73 ++++++++++++++++--- 2 files changed, 67 insertions(+), 12 deletions(-) diff --git a/ui/helpers/constants/common.ts b/ui/helpers/constants/common.ts index ca8756adf58d..62e8077b8c38 100644 --- a/ui/helpers/constants/common.ts +++ b/ui/helpers/constants/common.ts @@ -10,6 +10,12 @@ _supportRequestLink = 'https://metamask-flask.zendesk.com/hc/en-us/requests/new'; ///: END:ONLY_INCLUDE_IN +///: BEGIN:ONLY_INCLUDE_IN(mmi) +_supportRequestLink = 'https://mmi-support.zendesk.com/hc/en-us/requests/new'; +export const SUPPORT_LINK = 'https://mmi-support.zendesk.com/hc/en-us'; +export const MMI_WEB_SITE = 'https://metamask.io/institutions/'; +///: END:ONLY_INCLUDE_IN + export const SUPPORT_REQUEST_LINK = _supportRequestLink; export const CONTRACT_ADDRESS_LINK = _contractAddressLink; export const PASSWORD_MIN_LENGTH = 8; diff --git a/ui/pages/settings/info-tab/info-tab.component.js b/ui/pages/settings/info-tab/info-tab.component.js index 5c6e4b66ecc4..9063b1ac5374 100644 --- a/ui/pages/settings/info-tab/info-tab.component.js +++ b/ui/pages/settings/info-tab/info-tab.component.js @@ -4,7 +4,12 @@ import PropTypes from 'prop-types'; import Button from '../../../components/ui/button'; import { Tag } from '../../../components/component-library'; -import { SUPPORT_REQUEST_LINK } from '../../../helpers/constants/common'; +import { + SUPPORT_REQUEST_LINK, + ///: BEGIN:ONLY_INCLUDE_IN(mmi) + MMI_WEB_SITE, + ///: END:ONLY_INCLUDE_IN +} from '../../../helpers/constants/common'; import { isBeta } from '../../../helpers/utils/build-types'; import { getNumberOfSettingsInSection, @@ -47,6 +52,13 @@ export default class InfoTab extends PureComponent { renderInfoLinks() { const { t } = this.context; + let privacyUrl = 'https://metamask.io/privacy.html'; + let siteUrl = 'https://metamask.io/'; + + ///: BEGIN:ONLY_INCLUDE_IN(mmi) + privacyUrl = 'https://consensys.net/codefi/about/privacy-policy/'; + siteUrl = MMI_WEB_SITE; + ///: END:ONLY_INCLUDE_IN return (
@@ -56,7 +68,7 @@ export default class InfoTab extends PureComponent {
); } From 5214e004464928808a4a5f3a85ebba247a77684a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Oliv=C3=A9?= Date: Fri, 24 Mar 2023 14:36:32 +0100 Subject: [PATCH 2/3] Fixed storybook urls --- ui/pages/settings/info-tab/info-tab.component.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/pages/settings/info-tab/info-tab.component.js b/ui/pages/settings/info-tab/info-tab.component.js index 9063b1ac5374..17c9f715b38f 100644 --- a/ui/pages/settings/info-tab/info-tab.component.js +++ b/ui/pages/settings/info-tab/info-tab.component.js @@ -52,14 +52,18 @@ export default class InfoTab extends PureComponent { renderInfoLinks() { const { t } = this.context; - let privacyUrl = 'https://metamask.io/privacy.html'; - let siteUrl = 'https://metamask.io/'; + let privacyUrl, siteUrl; ///: BEGIN:ONLY_INCLUDE_IN(mmi) privacyUrl = 'https://consensys.net/codefi/about/privacy-policy/'; siteUrl = MMI_WEB_SITE; ///: END:ONLY_INCLUDE_IN + ///: BEGIN:ONLY_INCLUDE_IN(main,beta,flask) + privacyUrl = 'https://metamask.io/privacy.html'; + siteUrl = 'https://metamask.io/'; + ///: END:ONLY_INCLUDE_IN + return (
From 9322030d24cca14525cc967478949c8d9771adfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Oliv=C3=A9?= Date: Fri, 24 Mar 2023 14:46:47 +0100 Subject: [PATCH 3/3] Removed isBeta mmi code fencing --- ui/pages/settings/info-tab/info-tab.component.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ui/pages/settings/info-tab/info-tab.component.js b/ui/pages/settings/info-tab/info-tab.component.js index 17c9f715b38f..8fef74d1210a 100644 --- a/ui/pages/settings/info-tab/info-tab.component.js +++ b/ui/pages/settings/info-tab/info-tab.component.js @@ -205,18 +205,7 @@ export default class InfoTab extends PureComponent { ref={this.settingsRefs[0]} className="info-tab__version-header" > - { - ///: BEGIN:ONLY_INCLUDE_IN(main,beta,flask) - isBeta() ? t('betaMetamaskVersion') : t('metamaskVersion') - ///: END:ONLY_INCLUDE_IN - } - { - ///: BEGIN:ONLY_INCLUDE_IN(mmi) - isBeta() - ? t('betaMetamaskInstitutionalVersion') - : t('metamaskInstitutionalVersion') - ///: END:ONLY_INCLUDE_IN - } + {isBeta() ? t('betaMetamaskVersion') : t('metamaskVersion')}
{this.state.version}