1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 12:56:01 +01:00
metamask-extension/ui/components/app/modals/confirm-remove-account/confirm-remove-account.container.js

28 lines
781 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { compose } from 'redux';
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props';
import {
getCurrentChainId,
getRpcPrefsForCurrentProvider,
} from '../../../../selectors';
import { removeAccount } from '../../../../store/actions';
import ConfirmRemoveAccount from './confirm-remove-account.component';
2018-07-11 01:19:29 +02:00
2020-02-15 21:34:12 +01:00
const mapStateToProps = (state) => {
2018-07-11 06:20:40 +02:00
return {
chainId: getCurrentChainId(state),
rpcPrefs: getRpcPrefsForCurrentProvider(state),
};
};
2018-07-11 06:20:40 +02:00
2020-02-15 21:34:12 +01:00
const mapDispatchToProps = (dispatch) => {
2018-07-11 01:19:29 +02:00
return {
removeAccount: (address) => dispatch(removeAccount(address)),
};
};
2018-07-11 01:19:29 +02:00
export default compose(
withModalProps,
connect(mapStateToProps, mapDispatchToProps),
)(ConfirmRemoveAccount);