A Metamask fork with Infura removed and default networks editable
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.
 
 
 
 
 
ciphermask/ui/components/app/permissions-connect-permiss.../permissions-connect-permiss...

33 lines
982 B

import React, { useMemo } from 'react';
import PropTypes from 'prop-types';
import { useI18nContext } from '../../../hooks/useI18nContext';
export default function PermissionsConnectPermissionList({ permissions }) {
const t = useI18nContext();
const PERMISSION_TYPES = useMemo(() => {
return {
eth_accounts: {
leftIcon: 'fas fa-eye',
label: t('eth_accounts'),
rightIcon: null,
},
};
}, [t]);
return (
<div className="permissions-connect-permission-list">
{Object.keys(permissions).map((permission) => (
<div className="permission" key={PERMISSION_TYPES[permission].label}>
<i className={PERMISSION_TYPES[permission].leftIcon} />
{PERMISSION_TYPES[permission].label}
<i className={PERMISSION_TYPES[permission].rightIcon} />
</div>
))}
</div>
);
}
PermissionsConnectPermissionList.propTypes = {
permissions: PropTypes.objectOf(PropTypes.bool).isRequired,
};