1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-02 06:07:06 +01:00
metamask-extension/ui/components/app/modals/account-details-modal/account-details-modal.container.js
Filip Sekulic ea247d4e4a
Fix 'block link explorer on custom networks' (#13870)
* Created a logic for the 'Add a block explorer URL'

Removed unused message

Message logic rollback

Modified history push operation

WIP: Pushing before rebasing

Applied requested changes

Removed unintenionally added code

* Lint fix

* Metrics fixed
2022-08-02 16:56:02 -05:00

45 lines
1.2 KiB
JavaScript

import { connect } from 'react-redux';
import { compose } from 'redux';
import { withRouter } from 'react-router-dom';
import {
showModal,
setAccountLabel,
hideModal,
} from '../../../../store/actions';
import {
getSelectedIdentity,
getRpcPrefsForCurrentProvider,
getCurrentChainId,
getMetaMaskAccountsOrdered,
getBlockExplorerLinkText,
} 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),
blockExplorerLinkText: getBlockExplorerLinkText(state, true),
};
};
const mapDispatchToProps = (dispatch) => {
return {
showExportPrivateKeyModal: () =>
dispatch(showModal({ name: 'EXPORT_PRIVATE_KEY' })),
setAccountLabel: (address, label) =>
dispatch(setAccountLabel(address, label)),
hideModal: () => {
dispatch(hideModal());
},
};
};
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps),
)(AccountDetailsModal);