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