import React, { Component } from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import classnames from 'classnames' import { withRouter } from 'react-router-dom' import { compose } from 'recompose' import Identicon from '../../../../ui/app/components/identicon' import {exportAsFile} from '../../../../ui/app/util' import Breadcrumbs from './breadcrumbs' import LoadingScreen from './loading-screen' import { DEFAULT_ROUTE, INITIALIZE_CONFIRM_SEED_ROUTE } from '../../../../ui/app/routes' const LockIcon = props => ( ) class BackupPhraseScreen extends Component { static propTypes = { isLoading: PropTypes.bool.isRequired, address: PropTypes.string.isRequired, seedWords: PropTypes.string, history: PropTypes.object, }; static defaultProps = { seedWords: '', } constructor (props) { super(props) this.state = { isShowingSecret: false, } } componentWillMount () { const { seedWords, history } = this.props if (!seedWords) { history.push(DEFAULT_ROUTE) } } exportSeedWords = () => { const { seedWords } = this.props exportAsFile('MetaMask Secret Backup Phrase', seedWords, 'text/plain') } renderSecretWordsContainer () { const { isShowingSecret } = this.state return (