1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Ux: Icon: Update fa-eye with ICON_NAMES.EYE (#17800)

* updated fa-eye

* Fix build error

* resolved lint error

* lint error fix

---------

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
This commit is contained in:
Nidhi Kumari 2023-02-28 12:55:58 +05:30 committed by GitHub
parent cb113dd2a6
commit 878bb4ab25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
import deepFreeze from 'deep-freeze-strict'; import deepFreeze from 'deep-freeze-strict';
///: BEGIN:ONLY_INCLUDE_IN(flask)
import React from 'react'; import React from 'react';
///: BEGIN:ONLY_INCLUDE_IN(flask)
import { getRpcCaveatOrigins } from '@metamask/snaps-controllers/dist/snaps/endowments/rpc'; import { getRpcCaveatOrigins } from '@metamask/snaps-controllers/dist/snaps/endowments/rpc';
import { SnapCaveatType } from '@metamask/snaps-utils'; import { SnapCaveatType } from '@metamask/snaps-utils';
import { isNonEmptyArray } from '@metamask/controller-utils'; import { isNonEmptyArray } from '@metamask/controller-utils';
@ -14,16 +15,19 @@ import {
} from '../../../shared/constants/permissions'; } from '../../../shared/constants/permissions';
///: BEGIN:ONLY_INCLUDE_IN(flask) ///: BEGIN:ONLY_INCLUDE_IN(flask)
import { SNAPS_METADATA } from '../../../shared/constants/snaps'; import { SNAPS_METADATA } from '../../../shared/constants/snaps';
import { Icon, ICON_NAMES } from '../../components/component-library';
import { coinTypeToProtocolName, getSnapDerivationPathName } from './util';
///: END:ONLY_INCLUDE_IN ///: END:ONLY_INCLUDE_IN
import { Icon, ICON_NAMES } from '../../components/component-library';
import { Color } from '../constants/design-system';
import { coinTypeToProtocolName, getSnapDerivationPathName } from './util'; // eslint-disable-line no-unused-vars
const UNKNOWN_PERMISSION = Symbol('unknown'); const UNKNOWN_PERMISSION = Symbol('unknown');
const PERMISSION_DESCRIPTIONS = deepFreeze({ const PERMISSION_DESCRIPTIONS = deepFreeze({
[RestrictedMethods.eth_accounts]: (t) => ({ [RestrictedMethods.eth_accounts]: (t) => ({
label: t('permission_ethereumAccounts'), label: t('permission_ethereumAccounts'),
leftIcon: 'fas fa-eye', leftIcon: (
<Icon name={ICON_NAMES.EYE} margin={4} color={Color.iconAlternative} />
),
rightIcon: null, rightIcon: null,
weight: 2, weight: 2,
}), }),
@ -49,7 +53,13 @@ const PERMISSION_DESCRIPTIONS = deepFreeze({
[RestrictedMethods.snap_getBip32PublicKey]: (t, _, permissionValue) => [RestrictedMethods.snap_getBip32PublicKey]: (t, _, permissionValue) =>
permissionValue.caveats[0].value.map(({ path, curve }) => { permissionValue.caveats[0].value.map(({ path, curve }) => {
const baseDescription = { const baseDescription = {
leftIcon: 'fas fa-eye', leftIcon: (
<Icon
name={ICON_NAMES.EYE}
margin={4}
color={Color.iconAlternative}
/>
),
rightIcon: null, rightIcon: null,
weight: 1, weight: 1,
}; };