Newer
Older
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
import { AccountCard } from 'fether-ui';
import { inject, observer } from 'mobx-react';
import i18n, { packageNS } from '../../../i18n';
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>{i18n.t(`${packageNS}:account.create.copy_phrase.msg1`)}</p>
Luke Schoen
committed
</div>
<div className='text -code'>{bip39Phrase}</div>
<div className='text'>
<div className='text -tiny'>
{i18n.t(`${packageNS}:account.create.copy_phrase.msg2`)}
Luke Schoen
committed
<ul className='-bulleted'>
<li>
{i18n.t(`${packageNS}:account.create.copy_phrase.msg3`)}
Luke Schoen
committed
</li>
<li>
{i18n.t(`${packageNS}:account.create.copy_phrase.msg4`)}
Luke Schoen
committed
</li>
</ul>
</div>
Luke Schoen
committed
<nav className='form-nav -space-around'>
{currentStep > 1 && (
<button
className='button -back'
onClick={history.goBack}
type='button'
>
{i18n.t(`${packageNS}:navigation.back`)}
Luke Schoen
committed
</button>
)}
<button autoFocus className='button'>
{i18n.t(`${packageNS}:navigation.next`)}
Luke Schoen
committed
</nav>
</form>
]}
i18n={i18n}
packageNS={packageNS}
Luke Schoen
committed
/>
</RequireHealthOverlay>
export default AccountCopyPhrase;