1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-13 21:27:12 +01:00
metamask-extension/ui/components/app/modals/account-details-modal/account-details-modal.container.js

32 lines
874 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { showModal, setAccountLabel } from '../../../../store/actions';
import {
getSelectedIdentity,
getRpcPrefsForCurrentProvider,
getCurrentChainId,
} from '../../../../selectors';
import AccountDetailsModal from './account-details-modal.component';
const mapStateToProps = (state) => {
return {
chainId: getCurrentChainId(state),
selectedIdentity: getSelectedIdentity(state),
keyrings: state.metamask.keyrings,
rpcPrefs: getRpcPrefsForCurrentProvider(state),
};
};
const mapDispatchToProps = (dispatch) => {
return {
2020-11-03 00:41:28 +01:00
showExportPrivateKeyModal: () =>
dispatch(showModal({ name: 'EXPORT_PRIVATE_KEY' })),
setAccountLabel: (address, label) =>
dispatch(setAccountLabel(address, label)),
};
};
export default connect(
mapStateToProps,
mapDispatchToProps,
)(AccountDetailsModal);