{content}
// @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as generateWalletActions from 'actions/generateWallet';
import type {
GenerateNewWalletAction,
ContinueToPaperAction,
ResetGenerateWalletAction
} from 'actions/generateWallet';
import EnterPassword from './components/EnterPassword';
import DownloadWallet from './components/DownloadWallet';
import PaperWallet from './components/PaperWallet';
import type PrivKeyWallet from 'libs/wallet/privkey';
import type { State } from 'reducers';
type Props = {
// Redux state
activeStep: string, // FIXME union actual steps
password: string,
wallet: ?PrivKeyWallet,
walletPasswordForm: Object,
// Actions
generateNewWallet: (pw: string) => GenerateNewWalletAction,
continueToPaper: () => ContinueToPaperAction,
resetGenerateWallet: () => ResetGenerateWalletAction
};
class GenerateWallet extends Component {
props: Props;
componentWillUnmount() {
this.props.resetGenerateWallet();
}
render() {
const { activeStep, wallet, password } = this.props;
let content;
switch (activeStep) {
case 'password':
content = (