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';
@inject('createAccountStore')
@observer
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);
<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>
</div>
<nav className='form-nav -space-around'>
{currentStep > 1 && (
<button autoFocus className='button'>
Next
</button>
export default AccountCopyPhrase;