MyCrypto/common/containers/Tabs/GenerateWallet/index.js

42 lines
1.3 KiB
JavaScript
Raw Normal View History

2017-05-30 20:36:52 +00:00
import GenerateWalletPasswordComponent from './components/GenerateWalletPasswordComponent';
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
class GenerateWallet extends Component {
constructor(props) {
super(props);
}
2017-04-12 05:04:27 +00:00
static propTypes = {
// state
generateWalletPassword: PropTypes.object,
showPassword: PropTypes.bool,
hasDownloadedWalletFile: PropTypes.bool,
generateWalletFile: PropTypes.bool,
canProceedToPaper: PropTypes.bool,
// actions
generateWalletShowPassword: PropTypes.func,
generateWalletGenerateFile: PropTypes.func,
generateWalletDownloadFile: PropTypes.func,
generateWalletConfirmContinueToPaper: PropTypes.func
};
2017-04-12 05:04:27 +00:00
render() {
return <GenerateWalletPasswordComponent {...this.props} />;
}
2017-04-12 05:04:27 +00:00
}
function mapStateToProps(state) {
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
}
export default connect(mapStateToProps, generateWalletActions)(GenerateWallet);