1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 11:01:41 +01:00
metamask-extension/ui/components/app/permission-page-container/permission-page-container.container.js
2021-04-28 14:53:59 -05:00

19 lines
589 B
JavaScript

import { connect } from 'react-redux';
import { getMetaMaskIdentities } from '../../../selectors';
import PermissionPageContainer from './permission-page-container.component';
const mapStateToProps = (state, ownProps) => {
const { selectedIdentities } = ownProps;
const allIdentities = getMetaMaskIdentities(state);
const allIdentitiesSelected =
Object.keys(selectedIdentities).length ===
Object.keys(allIdentities).length && selectedIdentities.length > 1;
return {
allIdentitiesSelected,
};
};
export default connect(mapStateToProps)(PermissionPageContainer);