import { ContinueToPaperAction } from 'actions/generateWallet'; import { IFullWallet, IV3Wallet } from 'ethereumjs-wallet'; import { toChecksumAddress } from 'ethereumjs-util'; import { NewTabLink } from 'components/ui'; import React, { Component } from 'react'; import translate from 'translations'; import { makeBlob } from 'utils/blob'; import './DownloadWallet.scss'; import Template from './Template'; interface Props { wallet: IFullWallet; password: string; continueToPaper(): ContinueToPaperAction; } interface State { hasDownloadedWallet: boolean; keystore: IV3Wallet | null; } export default class DownloadWallet extends Component { public state: State = { hasDownloadedWallet: false, keystore: null }; public componentWillMount() { this.setWallet(this.props.wallet, this.props.password); } public componentWillUpdate(nextProps: Props) { if (this.props.wallet !== nextProps.wallet) { this.setWallet(nextProps.wallet, nextProps.password); } } public render() { const { hasDownloadedWallet } = this.state; const filename = this.props.wallet.getV3Filename(); const content = (

{translate('GEN_Label_2')}

{translate('x_Download')} {translate('x_Keystore2')}

Do not lose it! It cannot be recovered if you lose it.

Do not share it! Your funds will be stolen if you use this file on a malicious/phishing site.

Make a backup! Secure it like the millions of dollars it may one day be worth.

); const help = (

{translate('GEN_Help_8')}

{translate('GEN_Help_11')}

{translate('GEN_Help_4')}

); return