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.
18 lines
589 B
18 lines
589 B
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);
|
|
|