mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Consolidating Zendesk URLs in to constants file (#15669)
This commit is contained in:
parent
4424686a3c
commit
4dab986ad2
@ -34,6 +34,7 @@ import ConfirmationPage from '../../../pages/confirmation/confirmation';
|
||||
import { FEATURED_RPCS } from '../../../../shared/constants/network';
|
||||
import { ADD_NETWORK_ROUTE } from '../../../helpers/constants/routes';
|
||||
import { getEnvironmentType } from '../../../../app/scripts/lib/util';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
const AddNetwork = () => {
|
||||
const t = useContext(I18nContext);
|
||||
@ -216,7 +217,7 @@ const AddNetwork = () => {
|
||||
{t('addNetworkTooltipWarning', [
|
||||
<a
|
||||
key="zendesk_page_link"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/4417500466971"
|
||||
href={ZENDESK_URLS.UNKNOWN_NETWORK}
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
|
@ -25,6 +25,7 @@ import {
|
||||
detectCollectibles,
|
||||
} from '../../../store/actions';
|
||||
import { useCollectiblesCollections } from '../../../hooks/useCollectiblesCollections';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
export default function CollectiblesTab({ onAddNFT }) {
|
||||
const useCollectibleDetection = useSelector(getUseCollectibleDetection);
|
||||
@ -92,7 +93,7 @@ export default function CollectiblesTab({ onAddNFT }) {
|
||||
type="link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/360058238591-NFT-tokens-in-MetaMask-wallet"
|
||||
href={ZENDESK_URLS.NFT_TOKENS}
|
||||
>
|
||||
{t('learnMoreUpperCase')}
|
||||
</Button>
|
||||
|
@ -15,6 +15,7 @@ import { COLORS, TYPOGRAPHY } from '../../../helpers/constants/design-system';
|
||||
import { INSUFFICIENT_FUNDS_ERROR_KEY } from '../../../helpers/constants/error-keys';
|
||||
import { useGasFeeContext } from '../../../contexts/gasFee';
|
||||
import AppLoadingSpinner from '../app-loading-spinner';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
import EditGasItem from './edit-gas-item';
|
||||
import NetworkStatistics from './network-statistics';
|
||||
|
||||
@ -95,7 +96,7 @@ const EditGasFeePopover = () => {
|
||||
key="learnMoreLink"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/4404600179227-User-Guide-Gas"
|
||||
href={ZENDESK_URLS.USER_GUIDE_GAS}
|
||||
>
|
||||
{t('learnMore')}
|
||||
</a>,
|
||||
|
@ -5,6 +5,7 @@ import Modal from '../../modal';
|
||||
import { addressSummary, getURLHostName } from '../../../../helpers/utils/util';
|
||||
import Identicon from '../../../ui/identicon';
|
||||
import { EVENT } from '../../../../../shared/constants/metametrics';
|
||||
import ZENDESK_URLS from '../../../../helpers/constants/zendesk-url';
|
||||
|
||||
export default class ConfirmRemoveAccount extends Component {
|
||||
static propTypes = {
|
||||
@ -108,7 +109,7 @@ export default class ConfirmRemoveAccount extends Component {
|
||||
className="confirm-remove-account__link"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/360015289932"
|
||||
href={ZENDESK_URLS.IMPORTED_ACCOUNTS}
|
||||
>
|
||||
{t('learnMore')}
|
||||
</a>
|
||||
|
@ -1,5 +1,6 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
export default class PermissionsConnectFooter extends Component {
|
||||
static contextTypes = {
|
||||
@ -16,7 +17,7 @@ export default class PermissionsConnectFooter extends Component {
|
||||
className="permissions-connect-footer__text--link"
|
||||
onClick={() => {
|
||||
global.platform.openTab({
|
||||
url: 'https://metamask.zendesk.com/hc/en-us/articles/4405506066331-User-guide-Dapps',
|
||||
url: ZENDESK_URLS.USER_GUIDE_DAPPS,
|
||||
});
|
||||
}}
|
||||
>
|
||||
|
@ -18,6 +18,7 @@ import {
|
||||
EXPERIMENTAL_ROUTE,
|
||||
} from '../../../helpers/constants/routes';
|
||||
import { TYPOGRAPHY } from '../../../helpers/constants/design-system';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
function getActionFunctionById(id, history) {
|
||||
const actionFunctions = {
|
||||
@ -38,7 +39,7 @@ function getActionFunctionById(id, history) {
|
||||
5: () => {
|
||||
updateViewedNotifications({ 5: true });
|
||||
global.platform.openTab({
|
||||
url: 'https://metamask.zendesk.com/hc/en-us/articles/360060826432',
|
||||
url: ZENDESK_URLS.SECRET_RECOVERY_PHRASE,
|
||||
});
|
||||
},
|
||||
8: () => {
|
||||
|
@ -3,16 +3,39 @@ const ZENDESK_URLS = {
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360015489031',
|
||||
ADD_MISSING_ACCOUNTS:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360015489271',
|
||||
IMPORT_ACCOUNTS:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360015489331',
|
||||
TOKEN_SAFETY_PRACTICES:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/4403988839451',
|
||||
SECRET_RECOVERY_PHRASE:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360060826432-What-is-a-Secret-Recovery-Phrase-and-how-to-keep-your-crypto-wallet-secure',
|
||||
PASSWORD_ARTICLE:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/4404722782107',
|
||||
BASIC_SAFETY:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360015489591-Basic-Safety-Tips',
|
||||
CUSTOMIZE_NONCE:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/7417499333531-How-to-customize-a-transaction-nonce',
|
||||
HARDWARE_CONNECTION:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360020394612-How-to-connect-a-Trezor-or-Ledger-Hardware-Wallet',
|
||||
IMPORT_ACCOUNTS:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360015489331',
|
||||
IMPORTED_ACCOUNTS:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360015289932',
|
||||
INFURA_BLOCKAGE:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360059386712',
|
||||
LEGACY_WEB3: 'https://metamask.zendesk.com/hc/en-us/articles/360053147012',
|
||||
NFT_TOKENS:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360058238591-NFT-tokens-in-MetaMask-wallet',
|
||||
PASSWORD_ARTICLE:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/4404722782107',
|
||||
SECRET_RECOVERY_PHRASE:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360060826432-What-is-a-Secret-Recovery-Phrase-and-how-to-keep-your-crypto-wallet-secure',
|
||||
SPEEDUP_CANCEL:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360015489251-How-to-speed-up-or-cancel-a-pending-transaction',
|
||||
TOKEN_SAFETY_PRACTICES:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/4403988839451',
|
||||
UNKNOWN_NETWORK:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/4417500466971',
|
||||
USER_GUIDE_CUSTOM_NETWORKS:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/4404424659995',
|
||||
USER_GUIDE_DAPPS:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/4405506066331-User-guide-Dapps',
|
||||
USER_GUIDE_GAS:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/4404600179227-User-Guide-Gas',
|
||||
VERIFY_CUSTOM_NETWORK:
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360057142392',
|
||||
};
|
||||
|
||||
export default ZENDESK_URLS;
|
||||
|
@ -11,6 +11,7 @@ import Button from '../../../components/ui/button';
|
||||
import Typography from '../../../components/ui/typography';
|
||||
import { TYPOGRAPHY } from '../../../helpers/constants/design-system';
|
||||
import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
const TransactionAlerts = ({
|
||||
userAcknowledgedGasMissing,
|
||||
@ -74,7 +75,7 @@ const TransactionAlerts = ({
|
||||
{t('learnCancelSpeeedup', [
|
||||
<a
|
||||
key="cancelSpeedUpInfo"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/360015489251-How-to-speed-up-or-cancel-a-pending-transaction"
|
||||
href={ZENDESK_URLS.SPEEDUP_CANCEL}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
|
@ -14,6 +14,7 @@ import {
|
||||
import { DEFAULT_ROUTE } from '../../../helpers/constants/routes';
|
||||
|
||||
import fetchWithCache from '../../../helpers/utils/fetch-with-cache';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
const UNRECOGNIZED_CHAIN = {
|
||||
id: 'UNRECOGNIZED_CHAIN',
|
||||
@ -42,7 +43,7 @@ const MISMATCHED_CHAIN_RECOMMENDATION = {
|
||||
element: 'a',
|
||||
key: 'mismatchedChainLink',
|
||||
props: {
|
||||
href: 'https://metamask.zendesk.com/hc/en-us/articles/360057142392',
|
||||
href: ZENDESK_URLS.VERIFY_CUSTOM_NETWORK,
|
||||
target: '__blank',
|
||||
tabIndex: 0,
|
||||
},
|
||||
@ -231,7 +232,7 @@ function getValues(pendingApproval, t, actions, history) {
|
||||
{t('someNetworksMayPoseSecurity')}{' '}
|
||||
<a
|
||||
key="zendesk_page_link"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/4417500466971"
|
||||
href={ZENDESK_URLS.UNKNOWN_NETWORK}
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
style={{ color: 'var(--color-primary-default)' }}
|
||||
@ -268,7 +269,7 @@ function getValues(pendingApproval, t, actions, history) {
|
||||
children: t('addEthereumChainConfirmationRisksLearnMoreLink'),
|
||||
key: 'addEthereumChainConfirmationRisksLearnMoreLink',
|
||||
props: {
|
||||
href: 'https://metamask.zendesk.com/hc/en-us/articles/4404424659995',
|
||||
href: ZENDESK_URLS.USER_GUIDE_CUSTOM_NETWORKS,
|
||||
target: '__blank',
|
||||
},
|
||||
},
|
||||
|
@ -2,6 +2,7 @@ import {
|
||||
RESIZE,
|
||||
TYPOGRAPHY,
|
||||
} from '../../../../../helpers/constants/design-system';
|
||||
import ZENDESK_URLS from '../../../../../helpers/constants/zendesk-url';
|
||||
|
||||
function getValues(pendingApproval, t, actions) {
|
||||
const { prompt, description, textAreaContent } = pendingApproval.requestData;
|
||||
@ -76,7 +77,7 @@ function getValues(pendingApproval, t, actions) {
|
||||
children: t('learnMoreUpperCase'),
|
||||
key: 'learnMore-a-href',
|
||||
props: {
|
||||
href: 'https://metamask.zendesk.com/hc/en-us/articles/4405506066331-User-guide-Dapps',
|
||||
href: ZENDESK_URLS.USER_GUIDE_DAPPS,
|
||||
target: '__blank',
|
||||
},
|
||||
},
|
||||
|
@ -16,6 +16,7 @@ import {
|
||||
DEVICE_NAMES,
|
||||
LEDGER_TRANSPORT_TYPES,
|
||||
} from '../../../../shared/constants/hardware-wallets';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
import SelectHardware from './select-hardware';
|
||||
import AccountList from './account-list';
|
||||
|
||||
@ -288,7 +289,7 @@ class ConnectHardwareForm extends Component {
|
||||
this.state.device,
|
||||
// eslint-disable-next-line react/jsx-key
|
||||
<a
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/360020394612-How-to-connect-a-Trezor-or-Ledger-Hardware-Wallet"
|
||||
href={ZENDESK_URLS.HARDWARE_CONNECTION}
|
||||
key="hardware-connection-guide"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
@ -11,6 +11,7 @@ import {
|
||||
DEVICE_NAMES,
|
||||
LEDGER_TRANSPORT_TYPES,
|
||||
} from '../../../../shared/constants/hardware-wallets';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
export default class SelectHardware extends Component {
|
||||
static contextTypes = {
|
||||
@ -198,7 +199,7 @@ export default class SelectHardware extends Component {
|
||||
message: this.context.t('step2LedgerWalletMsg', [
|
||||
<a
|
||||
className="hw-connect__msg-link"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/360020394612-How-to-connect-a-Trezor-or-Ledger-Hardware-Wallet"
|
||||
href={ZENDESK_URLS.HARDWARE_CONNECTION}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
key="ledger-support-link"
|
||||
@ -237,7 +238,7 @@ export default class SelectHardware extends Component {
|
||||
message: this.context.t('step1LatticeWalletMsg', [
|
||||
<a
|
||||
className="hw-connect__msg-link"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/4408552261275"
|
||||
href={ZENDESK_URLS.HARDWARE_CONNECTION}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
key="lattice-setup-link"
|
||||
@ -277,7 +278,7 @@ export default class SelectHardware extends Component {
|
||||
message: this.context.t('step1TrezorWalletMsg', [
|
||||
<a
|
||||
className="hw-connect__msg-link"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/360020394612-How-to-connect-a-Trezor-or-Ledger-Hardware-Wallet"
|
||||
href={ZENDESK_URLS.HARDWARE_CONNECTION}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
key="trezor-support-link"
|
||||
|
@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
||||
import Dropdown from '../../../components/ui/dropdown';
|
||||
|
||||
// Subviews
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
import JsonImportView from './json';
|
||||
import PrivateKeyImportView from './private-key';
|
||||
|
||||
@ -48,7 +49,7 @@ export default class AccountImportSubview extends Component {
|
||||
className="new-account-info-link"
|
||||
onClick={() => {
|
||||
global.platform.openTab({
|
||||
url: 'https://metamask.zendesk.com/hc/en-us/articles/360015289932',
|
||||
url: ZENDESK_URLS.IMPORTED_ACCOUNTS,
|
||||
});
|
||||
}}
|
||||
>
|
||||
|
@ -9,9 +9,7 @@ import { getMetaMaskAccounts } from '../../../selectors';
|
||||
import Button from '../../../components/ui/button';
|
||||
import { EVENT, EVENT_NAMES } from '../../../../shared/constants/metametrics';
|
||||
import { getMostRecentOverviewPage } from '../../../ducks/history/history';
|
||||
|
||||
const HELP_LINK =
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360015489331-Importing-an-Account';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
class JsonImportSubview extends Component {
|
||||
state = {
|
||||
@ -30,7 +28,7 @@ class JsonImportSubview extends Component {
|
||||
<p>{this.context.t('usedByClients')}</p>
|
||||
<a
|
||||
className="new-account-import-form__help-link"
|
||||
href={HELP_LINK}
|
||||
href={ZENDESK_URLS.IMPORTED_ACCOUNTS}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
|
@ -11,6 +11,7 @@ import {
|
||||
EVENT_NAMES,
|
||||
CONTEXT_PROPS,
|
||||
} from '../../../../shared/constants/metametrics';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
export default class EndOfFlowScreen extends PureComponent {
|
||||
static contextTypes = {
|
||||
@ -118,7 +119,7 @@ export default class EndOfFlowScreen extends PureComponent {
|
||||
<div className="first-time-flow__text-block end-of-flow__text-4">
|
||||
{`*${t('endOfFlowMessage8')}`}
|
||||
<a
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/360015489591-Basic-Safety-Tips"
|
||||
href={ZENDESK_URLS.BASIC_SAFETY}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
|
@ -49,6 +49,7 @@ import {
|
||||
CONFIRMATION_V_NEXT_ROUTE,
|
||||
ADD_COLLECTIBLE_ROUTE,
|
||||
} from '../../helpers/constants/routes';
|
||||
import ZENDESK_URLS from '../../helpers/constants/zendesk-url';
|
||||
///: BEGIN:ONLY_INCLUDE_IN(beta)
|
||||
import BetaHomeFooter from './beta/beta-home-footer.component';
|
||||
///: END:ONLY_INCLUDE_IN
|
||||
@ -58,10 +59,6 @@ import FlaskHomeFooter from './flask/flask-home-footer.component';
|
||||
|
||||
const LEARN_MORE_URL =
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360045129011-Intro-to-MetaMask-v8-extension';
|
||||
const LEGACY_WEB3_URL =
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360053147012';
|
||||
const INFURA_BLOCKAGE_URL =
|
||||
'https://metamask.zendesk.com/hc/en-us/articles/360059386712';
|
||||
|
||||
function shouldCloseNotificationPopup({
|
||||
isNotification,
|
||||
@ -413,7 +410,7 @@ export default class Home extends PureComponent {
|
||||
key="web3ShimUsageNotificationLink"
|
||||
className="home-notification__text-link"
|
||||
onClick={() =>
|
||||
global.platform.openTab({ url: LEGACY_WEB3_URL })
|
||||
global.platform.openTab({ url: ZENDESK_URLS.LEGACY_WEB3 })
|
||||
}
|
||||
>
|
||||
{t('here')}
|
||||
@ -474,7 +471,7 @@ export default class Home extends PureComponent {
|
||||
key="infuraBlockedNotificationLink"
|
||||
className="home-notification__text-link"
|
||||
onClick={() =>
|
||||
global.platform.openTab({ url: INFURA_BLOCKAGE_URL })
|
||||
global.platform.openTab({ url: ZENDESK_URLS.INFURA_BLOCKAGE })
|
||||
}
|
||||
>
|
||||
{t('here')}
|
||||
|
@ -2,6 +2,7 @@ import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Button from '../../../../components/ui/button';
|
||||
import IconTokenSearch from '../../../../components/ui/icon/icon-token-search';
|
||||
import ZENDESK_URLS from '../../../../helpers/constants/zendesk-url';
|
||||
|
||||
export default class TokenListPlaceholder extends Component {
|
||||
static contextTypes = {
|
||||
@ -18,7 +19,7 @@ export default class TokenListPlaceholder extends Component {
|
||||
<Button
|
||||
type="link"
|
||||
className="token-list-placeholder__link"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/360015489031"
|
||||
href={ZENDESK_URLS.ADD_CUSTOM_TOKENS}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
|
@ -23,6 +23,7 @@ import {
|
||||
import { EVENT, EVENT_NAMES } from '../../../../shared/constants/metametrics';
|
||||
import { exportAsFile } from '../../../../shared/modules/export-utils';
|
||||
import ActionableMessage from '../../../components/ui/actionable-message';
|
||||
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
|
||||
|
||||
export default class AdvancedTab extends PureComponent {
|
||||
static contextTypes = {
|
||||
@ -628,7 +629,7 @@ export default class AdvancedTab extends PureComponent {
|
||||
<Button
|
||||
key="ledger-connection-settings-learn-more"
|
||||
type="link"
|
||||
href="https://metamask.zendesk.com/hc/en-us/articles/360020394612-How-to-connect-a-Trezor-or-Ledger-Hardware-Wallet"
|
||||
href={ZENDESK_URLS.HARDWARE_CONNECTION}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="settings-page__inline-link"
|
||||
|
Loading…
Reference in New Issue
Block a user