import React from 'react'; import { HelpLink } from 'components/ui'; import { HELP_ARTICLE } from 'config'; import './InsecureWalletWarning.scss'; interface Props { walletType: string | React.ReactElement; onContinue(): void; onCancel(): void; } interface State { hasConfirmedSite: boolean; hasAcknowledgedDownload: boolean; hasAcknowledgedWallets: boolean; } interface Checkbox { name: keyof State; label: string | React.ReactElement; } export class InsecureWalletWarning extends React.Component { public state: State = { hasConfirmedSite: false, hasAcknowledgedDownload: false, hasAcknowledgedWallets: false }; constructor(props: Props) { super(props); if (process.env.BUILD_DOWNLOADABLE) { props.onContinue(); } } public render() { if (process.env.BUILD_DOWNLOADABLE) { return null; } const { walletType, onContinue, onCancel } = this.props; const checkboxes: Checkbox[] = [ { name: 'hasAcknowledgedWallets', label: 'I acknowledge that I can and should use MetaMask or a Hardware Wallet' }, { name: 'hasAcknowledgedDownload', label: 'I acknowledge that I can and should download and run MyCrypto locally' }, { name: 'hasConfirmedSite', label: 'I have checked the URL and SSL certificate to make sure this is the real MyCrypto' } ]; const canContinue = checkboxes.reduce( (prev, checkbox) => prev && this.state[checkbox.name], true ); return (

This is not a recommended way to access your wallet

Entering your {walletType} on a website is dangerous. If our website is compromised, or you accidentally visit a phishing website, you could{' '} lose all of your funds. Before you continue, please consider:

  • Using MetaMask or a{' '} Hardware Wallet {' '} to access your wallet
  • Downloading MyCrypto and running it offline & locally
  • Reading{' '} How to Protect Yourself and Your Funds

If you must use your {walletType} online, please double-check the URL & SSL certificate. It should say {'https://www.mycrypto.com'} & MyCrypto, LLC [US] in your URL bar.

{checkboxes.map(this.makeCheckbox)}
); } private makeCheckbox = (checkbox: Checkbox) => { return ( ); }; private handleCheckboxChange = (ev: React.FormEvent) => { this.setState({ [ev.currentTarget.name as any]: !!ev.currentTarget.checked }); }; }