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.
33 lines
953 B
33 lines
953 B
import { connect } from 'react-redux';
|
|
import { showModal, setAccountLabel } from '../../../../store/actions';
|
|
import {
|
|
getSelectedIdentity,
|
|
getRpcPrefsForCurrentProvider,
|
|
getCurrentChainId,
|
|
getMetaMaskAccountsOrdered,
|
|
} 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),
|
|
accounts: getMetaMaskAccountsOrdered(state),
|
|
};
|
|
};
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
return {
|
|
showExportPrivateKeyModal: () =>
|
|
dispatch(showModal({ name: 'EXPORT_PRIVATE_KEY' })),
|
|
setAccountLabel: (address, label) =>
|
|
dispatch(setAccountLabel(address, label)),
|
|
};
|
|
};
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps,
|
|
)(AccountDetailsModal);
|
|
|