You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
874 B
32 lines
874 B
4 years ago
|
import { connect } from 'react-redux';
|
||
|
import { showModal, setAccountLabel } from '../../../../store/actions';
|
||
5 years ago
|
import {
|
||
|
getSelectedIdentity,
|
||
|
getRpcPrefsForCurrentProvider,
|
||
4 years ago
|
getCurrentChainId,
|
||
4 years ago
|
} from '../../../../selectors';
|
||
|
import AccountDetailsModal from './account-details-modal.component';
|
||
5 years ago
|
|
||
|
const mapStateToProps = (state) => {
|
||
|
return {
|
||
4 years ago
|
chainId: getCurrentChainId(state),
|
||
5 years ago
|
selectedIdentity: getSelectedIdentity(state),
|
||
|
keyrings: state.metamask.keyrings,
|
||
|
rpcPrefs: getRpcPrefsForCurrentProvider(state),
|
||
4 years ago
|
};
|
||
|
};
|
||
5 years ago
|
|
||
|
const mapDispatchToProps = (dispatch) => {
|
||
|
return {
|
||
4 years ago
|
showExportPrivateKeyModal: () =>
|
||
|
dispatch(showModal({ name: 'EXPORT_PRIVATE_KEY' })),
|
||
|
setAccountLabel: (address, label) =>
|
||
|
dispatch(setAccountLabel(address, label)),
|
||
4 years ago
|
};
|
||
|
};
|
||
5 years ago
|
|
||
4 years ago
|
export default connect(
|
||
|
mapStateToProps,
|
||
|
mapDispatchToProps,
|
||
|
)(AccountDetailsModal);
|