From 893e0c60ed19b551535d84ed4d7e00780a56c930 Mon Sep 17 00:00:00 2001 From: Kieran O'Neill Date: Wed, 20 Nov 2024 21:27:31 +0000 Subject: [PATCH] refactor: fix some lint warnings --- .../MoreInformationAccordion/MoreInformationAccordion.tsx | 1 - .../modals/AuthenticationModal/AuthenticationModal.tsx | 5 ----- src/extension/modals/MoveGroupModal/MoveGroupModal.tsx | 1 - .../modals/RemovePasskeyModal/RemovePasskeyModal.tsx | 7 +------ src/extension/pages/AccountPage/AccountPage.tsx | 5 +++-- .../repositories/BaseRepository/BaseRepository.ts | 3 +-- 6 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/extension/components/MoreInformationAccordion/MoreInformationAccordion.tsx b/src/extension/components/MoreInformationAccordion/MoreInformationAccordion.tsx index ed2985e0..8274007b 100644 --- a/src/extension/components/MoreInformationAccordion/MoreInformationAccordion.tsx +++ b/src/extension/components/MoreInformationAccordion/MoreInformationAccordion.tsx @@ -25,7 +25,6 @@ const MoreInformationAccordion: FC = ({ fontSize, isOpen, label, - minButtonHeight, onChange, }) => { const { t } = useTranslation(); diff --git a/src/extension/modals/AuthenticationModal/AuthenticationModal.tsx b/src/extension/modals/AuthenticationModal/AuthenticationModal.tsx index 87633322..f17d59fb 100644 --- a/src/extension/modals/AuthenticationModal/AuthenticationModal.tsx +++ b/src/extension/modals/AuthenticationModal/AuthenticationModal.tsx @@ -39,7 +39,6 @@ import PasskeyManager from '@extension/managers/PasskeyManager'; import PasswordManager from '@extension/managers/PasswordManager'; // hooks -import useColorModeValue from '@extension/hooks/useColorModeValue'; import useGenericInput from '@extension/hooks/useGenericInput'; import useSubTextColor from '@extension/hooks/useSubTextColor'; @@ -71,10 +70,6 @@ const AuthenticationModal: FC = ({ const logger = useSelectLogger(); const passkey = useSelectPasskeysPasskey(); // hooks - const primaryColorCode = useColorModeValue( - theme.colors.primaryLight['500'], - theme.colors.primaryDark['500'] - ); const { error: passwordError, label: passwordLabel, diff --git a/src/extension/modals/MoveGroupModal/MoveGroupModal.tsx b/src/extension/modals/MoveGroupModal/MoveGroupModal.tsx index 6f4a9316..e3ad59aa 100644 --- a/src/extension/modals/MoveGroupModal/MoveGroupModal.tsx +++ b/src/extension/modals/MoveGroupModal/MoveGroupModal.tsx @@ -1,6 +1,5 @@ import { Heading, - HStack, Modal, ModalBody, ModalContent, diff --git a/src/extension/modals/RemovePasskeyModal/RemovePasskeyModal.tsx b/src/extension/modals/RemovePasskeyModal/RemovePasskeyModal.tsx index 1326060d..a3d4ae9c 100644 --- a/src/extension/modals/RemovePasskeyModal/RemovePasskeyModal.tsx +++ b/src/extension/modals/RemovePasskeyModal/RemovePasskeyModal.tsx @@ -11,7 +11,7 @@ import { useDisclosure, VStack, } from '@chakra-ui/react'; -import React, { FC, useEffect } from 'react'; +import React, { type FC, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { IoTrashOutline } from 'react-icons/io5'; import { GoShieldSlash } from 'react-icons/go'; @@ -29,7 +29,6 @@ import { BODY_BACKGROUND_COLOR, DEFAULT_GAP } from '@extension/constants'; import { create as createNotification } from '@extension/features/notifications'; // hooks -import useColorModeValue from '@extension/hooks/useColorModeValue'; import useDefaultTextColor from '@extension/hooks/useDefaultTextColor'; import useSubTextColor from '@extension/hooks/useSubTextColor'; import useRemovePasskey from './hooks/useRemovePasskey'; @@ -73,10 +72,6 @@ const RemovePasskeyModal: FC = ({ onClose, removePasskey }) => { resetAction: resetRemovePasskeyAction, } = useRemovePasskey(); const defaultTextColor = useDefaultTextColor(); - const primaryColorCode = useColorModeValue( - theme.colors.primaryLight['500'], - theme.colors.primaryDark['500'] - ); const subTextColor = useSubTextColor(); // misc const isLoading = encrypting || requesting || saving; diff --git a/src/extension/pages/AccountPage/AccountPage.tsx b/src/extension/pages/AccountPage/AccountPage.tsx index 01884a9c..f33aebe5 100644 --- a/src/extension/pages/AccountPage/AccountPage.tsx +++ b/src/extension/pages/AccountPage/AccountPage.tsx @@ -47,6 +47,9 @@ import ReKeyedAccountBadge from '@extension/components/RekeyedAccountBadge'; import WatchAccountBadge from '@extension/components/WatchAccountBadge'; import AccountPageSkeletonContent from './AccountPageSkeletonContent'; +// components +import GroupBadge from '@extension/components/GroupBadge'; + // constants import { ACCOUNT_PAGE_HEADER_ITEM_HEIGHT, @@ -118,8 +121,6 @@ import type { import convertPublicKeyToAVMAddress from '@extension/utils/convertPublicKeyToAVMAddress'; import ellipseAddress from '@extension/utils/ellipseAddress'; import isReKeyedAuthAccountAvailable from '@extension/utils/isReKeyedAuthAccountAvailable'; -import { HiSave } from 'react-icons/hi'; -import GroupBadge from '@extension/components/GroupBadge'; const AccountPage: FC = () => { const { t } = useTranslation(); diff --git a/src/extension/repositories/BaseRepository/BaseRepository.ts b/src/extension/repositories/BaseRepository/BaseRepository.ts index 5bb3abe3..73bf7045 100644 --- a/src/extension/repositories/BaseRepository/BaseRepository.ts +++ b/src/extension/repositories/BaseRepository/BaseRepository.ts @@ -1,9 +1,8 @@ import { decode as decodeHex, encode as encodeHex } from '@stablelib/hex'; -import browser, { Menus } from 'webextension-polyfill'; +import browser from 'webextension-polyfill'; // types import type { TStorageItemTypes } from '@extension/types'; -import ItemType = Menus.ItemType; export default class BaseRepository { /**