From 854609a45d38f08e5f395e6181df476084789cd4 Mon Sep 17 00:00:00 2001 From: mohandast52 Date: Thu, 19 Dec 2024 18:52:39 +0530 Subject: [PATCH] refactor: remove unused selectedService reference and simplify masterSafe assignment in useAddressesLogs --- frontend/hooks/useLogs.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/frontend/hooks/useLogs.ts b/frontend/hooks/useLogs.ts index fc9e35ec..035d05c8 100644 --- a/frontend/hooks/useLogs.ts +++ b/frontend/hooks/useLogs.ts @@ -4,7 +4,6 @@ import { Eoa, WalletType } from '@/enums/Wallet'; import { Address } from '@/types/Address'; import { Service } from '@/types/Service'; import { Optional } from '@/types/Util'; -import { asEvmChainId } from '@/utils/middlewareHelpers'; import { useBalanceContext } from './useBalanceContext'; import { useMultisigs } from './useMultisig'; @@ -13,7 +12,6 @@ import { useStore } from './useStore'; import { useMasterWalletContext } from './useWallet'; const useAddressesLogs = () => { - const { selectedService } = useServices(); const { masterSafes, masterEoa, @@ -44,16 +42,11 @@ const useAddressesLogs = () => { return result; }, [masterSafesOwners, masterEoa]); - const masterSafe = masterSafes?.filter( - ({ evmChainId }) => - evmChainId === asEvmChainId(selectedService?.home_chain), - ); - return { isLoaded: masterWalletsIsFetched && masterSafesOwnersIsFetched, data: [ { masterEoa: masterEoa ?? 'undefined' }, - { masterSafe: masterSafe ?? 'undefined' }, + { masterSafe: masterSafes ?? 'undefined' }, { masterSafeBackups: backupEoas ?? 'undefined' }, ], };