// @flow import React, { Component } from 'react'; import PropTypes from 'prop-types'; import translate from 'translations'; import type PrivKeyWallet from 'libs/wallet/privkey'; import { makeBlob } from 'utils/blob'; import { getV3Filename } from 'libs/keystore'; type Props = { wallet: PrivKeyWallet, password: string, hasDownloadedWalletFile: boolean, downloadUTCGenerateWallet: () => any, confirmContinueToPaperGenerateWallet: () => any }; export default class DownloadWallet extends Component { props: Props; keystore: Object; static propTypes = { // Store state wallet: PropTypes.object.isRequired, password: PropTypes.string.isRequired, hasDownloadedWalletFile: PropTypes.bool, // Actions downloadUTCGenerateWallet: PropTypes.func, confirmContinueToPaperGenerateWallet: PropTypes.func }; componentWillMount() { this.keystore = this.props.wallet.toKeystore(this.props.password); } componentWillUpdate(nextProps: Props) { if (this.props.wallet !== nextProps.wallet) { this.keystore = nextProps.wallet.toKeystore(nextProps.password); } } render() { const { hasDownloadedWalletFile, downloadUTCGenerateWallet, confirmContinueToPaperGenerateWallet } = this.props; return (

{translate('GEN_Label_2')}


{translate('x_Download')}

{translate('x_KeystoreDesc')}





MyEtherWallet.com is not a web wallet & does not store or transmit this secret information at any time.
If you do not save your wallet file and password, we cannot recover them.
Save your wallet file now & back it up in a second location (not on your computer).

I understand. Continue.
); } getBlob() { return makeBlob('text/json;charset=UTF-8', this.keystore); } getFilename() { return getV3Filename(this.props.wallet.getAddress()); } }