2017-05-30 20:36:52 +00:00
|
|
|
import GenerateWalletPasswordComponent from './components/GenerateWalletPasswordComponent';
|
2017-06-20 03:15:38 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import * as generateWalletActions from 'actions/generateWallet';
|
2017-05-30 20:36:52 +00:00
|
|
|
import PropTypes from 'prop-types';
|
2017-04-12 05:04:27 +00:00
|
|
|
|
2017-04-27 03:58:01 +00:00
|
|
|
class GenerateWallet extends Component {
|
2017-06-20 03:15:38 +00:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
2017-04-12 05:04:27 +00:00
|
|
|
|
2017-06-20 03:15:38 +00:00
|
|
|
static propTypes = {
|
|
|
|
// state
|
|
|
|
generateWalletPassword: PropTypes.object,
|
|
|
|
showPassword: PropTypes.bool,
|
|
|
|
hasDownloadedWalletFile: PropTypes.bool,
|
|
|
|
generateWalletFile: PropTypes.bool,
|
|
|
|
canProceedToPaper: PropTypes.bool,
|
|
|
|
// actions
|
2017-06-20 05:59:54 +00:00
|
|
|
generateWalletShowPassword: PropTypes.func,
|
|
|
|
generateWalletGenerateFile: PropTypes.func,
|
|
|
|
generateWalletDownloadFile: PropTypes.func,
|
|
|
|
generateWalletConfirmContinueToPaper: PropTypes.func
|
2017-06-20 03:15:38 +00:00
|
|
|
};
|
2017-04-12 05:04:27 +00:00
|
|
|
|
2017-06-20 03:15:38 +00:00
|
|
|
render() {
|
|
|
|
return <GenerateWalletPasswordComponent {...this.props} />;
|
|
|
|
}
|
2017-04-12 05:04:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function mapStateToProps(state) {
|
2017-06-20 03:15:38 +00:00
|
|
|
return {
|
|
|
|
generateWalletPassword: state.form.generateWalletPassword,
|
|
|
|
generateWalletFile: state.generateWallet.generateWalletFile,
|
|
|
|
showPassword: state.generateWallet.showPassword,
|
|
|
|
hasDownloadedWalletFile: state.generateWallet.hasDownloadedWalletFile,
|
|
|
|
canProceedToPaper: state.generateWallet.canProceedToPaper
|
|
|
|
};
|
2017-04-12 05:04:27 +00:00
|
|
|
}
|
|
|
|
|
2017-06-20 03:15:38 +00:00
|
|
|
export default connect(mapStateToProps, generateWalletActions)(GenerateWallet);
|