Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
import { AccountCard } from 'fether-ui';
import { inject, observer } from 'mobx-react';
Luke Schoen
committed
import RequireHealthOverlay from '../../../RequireHealthOverlay';
class AccountCopyPhrase extends Component {
handleSubmit = () => {
const {
history,
location: { pathname }
} = this.props;
const currentStep = pathname.slice(-1);
history.push(`/accounts/new/${+currentStep + 1}`);
};
createAccountStore: { address, name, bip39Phrase },
location: { pathname }
} = this.props;
const currentStep = pathname.slice(-1);
Luke Schoen
committed
<RequireHealthOverlay require='node'>
<AccountCard
address={address}
name={name}
drawers={[
<form key='createAccount' onSubmit={this.handleSubmit}>
<div className='text'>
<p>Please write your secret phrase on a piece of paper:</p>
</div>
<div className='text -code'>{bip39Phrase}</div>
<div className='text'>
<div className='text -tiny'>
Keep it secure and secret.
<ul className='-bulleted'>
<li>
If you lose your secret phrase, your wallet cannot be
recovered.
</li>
<li>
If someone gets hold of your secret phrase, they will be
able to drain your account.
</li>
</ul>
</div>
Luke Schoen
committed
<nav className='form-nav -space-around'>
{currentStep > 1 && (
<button
className='button -back'
onClick={history.goBack}
type='button'
>
Back
</button>
)}
<button autoFocus className='button'>
Next
Luke Schoen
committed
</nav>
</form>
]}
/>
</RequireHealthOverlay>
export default AccountCopyPhrase;