From a3cd8e43245dd1cb9aff354fdb33d9b5208fc3f0 Mon Sep 17 00:00:00 2001 From: katspaugh <381895+katspaugh@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:39:55 +0100 Subject: [PATCH] Chore: fix lodash imports (#4580) --- src/components/new-safe/create/steps/ReviewStep/index.tsx | 2 +- src/components/tx/ApprovalEditor/ApprovalEditorForm.tsx | 2 +- src/components/tx/ApprovalEditor/Approvals.tsx | 2 +- src/components/tx/ApprovalEditor/EditableApprovalItem.tsx | 2 +- src/features/multichain/utils/utils.ts | 2 +- src/features/myAccounts/hooks/useAllSafesGrouped.ts | 2 +- src/pages/index.tsx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/new-safe/create/steps/ReviewStep/index.tsx b/src/components/new-safe/create/steps/ReviewStep/index.tsx index d5a3c41d6d..1e388ad0ce 100644 --- a/src/components/new-safe/create/steps/ReviewStep/index.tsx +++ b/src/components/new-safe/create/steps/ReviewStep/index.tsx @@ -43,7 +43,7 @@ import { useMemo, useState } from 'react' import ChainIndicator from '@/components/common/ChainIndicator' import NetworkWarning from '../../NetworkWarning' import useAllSafes from '@/features/myAccounts/hooks/useAllSafes' -import { uniq } from 'lodash' +import uniq from 'lodash/uniq' import { selectRpc } from '@/store/settingsSlice' import { AppRoutes } from '@/config/routes' import { type ReplayedSafeProps } from '@/store/slices' diff --git a/src/components/tx/ApprovalEditor/ApprovalEditorForm.tsx b/src/components/tx/ApprovalEditor/ApprovalEditorForm.tsx index 0e2666258d..594e7f05cc 100644 --- a/src/components/tx/ApprovalEditor/ApprovalEditorForm.tsx +++ b/src/components/tx/ApprovalEditor/ApprovalEditorForm.tsx @@ -5,7 +5,7 @@ import type { ApprovalInfo } from './hooks/useApprovalInfos' import { useMemo } from 'react' import EditableApprovalItem from './EditableApprovalItem' -import { groupBy } from 'lodash' +import groupBy from 'lodash/groupBy' import { SpenderField } from './SpenderField' export type ApprovalEditorFormData = { diff --git a/src/components/tx/ApprovalEditor/Approvals.tsx b/src/components/tx/ApprovalEditor/Approvals.tsx index 1f4fea25d6..1d10bd7cc2 100644 --- a/src/components/tx/ApprovalEditor/Approvals.tsx +++ b/src/components/tx/ApprovalEditor/Approvals.tsx @@ -3,7 +3,7 @@ import { List, ListItem, Stack } from '@mui/material' import { type ApprovalInfo } from '@/components/tx/ApprovalEditor/hooks/useApprovalInfos' import css from './styles.module.css' import ApprovalItem from '@/components/tx/ApprovalEditor/ApprovalItem' -import { groupBy } from 'lodash' +import groupBy from 'lodash/groupBy' import { useMemo } from 'react' import { SpenderField } from './SpenderField' diff --git a/src/components/tx/ApprovalEditor/EditableApprovalItem.tsx b/src/components/tx/ApprovalEditor/EditableApprovalItem.tsx index f9492c44fa..6e63db2848 100644 --- a/src/components/tx/ApprovalEditor/EditableApprovalItem.tsx +++ b/src/components/tx/ApprovalEditor/EditableApprovalItem.tsx @@ -6,7 +6,7 @@ import { ApprovalValueField } from './ApprovalValueField' import Track from '@/components/common/Track' import { MODALS_EVENTS } from '@/services/analytics' import { useFormContext } from 'react-hook-form' -import { get } from 'lodash' +import get from 'lodash/get' import { EditOutlined } from '@mui/icons-material' import TokenIcon from '@/components/common/TokenIcon' import { useState } from 'react' diff --git a/src/features/multichain/utils/utils.ts b/src/features/multichain/utils/utils.ts index 05384ee149..a9d549d50b 100644 --- a/src/features/multichain/utils/utils.ts +++ b/src/features/multichain/utils/utils.ts @@ -7,7 +7,7 @@ import { Safe_proxy_factory__factory } from '@/types/contracts' import { keccak256, ethers, solidityPacked, getCreate2Address, type Provider } from 'ethers' import { extractCounterfactualSafeSetup } from '@/features/counterfactual/utils' import { encodeSafeSetupCall } from '@/components/new-safe/create/logic' -import { memoize } from 'lodash' +import memoize from 'lodash/memoize' import { FEATURES, hasFeature } from '@/utils/chains' import { type SafeItem } from '@/features/myAccounts/hooks/useAllSafes' import { type MultiChainSafeItem } from '@/features/myAccounts/hooks/useAllSafesGrouped' diff --git a/src/features/myAccounts/hooks/useAllSafesGrouped.ts b/src/features/myAccounts/hooks/useAllSafesGrouped.ts index 23f3a4663f..e6620532d5 100644 --- a/src/features/myAccounts/hooks/useAllSafesGrouped.ts +++ b/src/features/myAccounts/hooks/useAllSafesGrouped.ts @@ -1,4 +1,4 @@ -import { groupBy } from 'lodash' +import groupBy from 'lodash/groupBy' import useAllSafes, { type SafeItem, type SafeItems } from './useAllSafes' import { useMemo } from 'react' import { sameAddress } from '@/utils/addresses' diff --git a/src/pages/index.tsx b/src/pages/index.tsx index d861eead32..b20b74a1eb 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react' import type { NextPage } from 'next' import { useRouter } from 'next/router' import { AppRoutes } from '@/config/routes' -import { isEmpty } from 'lodash' +import isEmpty from 'lodash/isEmpty' import local from '@/services/local-storage/local' import { addedSafesSlice, type AddedSafesState } from '@/store/addedSafesSlice'