diff --git a/apps/extension/src/ui/domains/Staking/hooks/bittensor/useGetBittensorStakeHotkeys.ts b/apps/extension/src/ui/domains/Staking/hooks/bittensor/useGetBittensorStakeHotkeys.ts index de49d7036..965d1e5ea 100644 --- a/apps/extension/src/ui/domains/Staking/hooks/bittensor/useGetBittensorStakeHotkeys.ts +++ b/apps/extension/src/ui/domains/Staking/hooks/bittensor/useGetBittensorStakeHotkeys.ts @@ -1,4 +1,4 @@ -import { useQueries, useQuery } from "@tanstack/react-query" +import { useQuery } from "@tanstack/react-query" import { ChainId } from "extension-core" import { useScaleApi } from "@ui/hooks/sapi/useScaleApi" @@ -9,8 +9,6 @@ type GetBittensorStakeHotkeys = { totalStaked?: number } -type GetBittensorStakesHotkeys = Omit & { addresses: string[] } - export const useGetBittensorStakeHotkeys = ({ chainId, address, @@ -26,26 +24,3 @@ export const useGetBittensorStakeHotkeys = ({ enabled: !!sapi && !!address && chainId === "bittensor", }) } - -export const useGetBittensorStakesHotkeys = ({ - chainId, - addresses, - totalStaked, -}: GetBittensorStakesHotkeys) => { - const { data: sapi } = useScaleApi(chainId) - return useQueries({ - queries: addresses.map((address) => ({ - queryKey: ["getBittensorStakeHotkeys", sapi?.id, address, totalStaked], - queryFn: () => sapi?.getStorage("SubtensorModule", "StakingHotkeys", [address]), - enabled: !!sapi && !!address && chainId === "bittensor", - })), - combine: (results) => { - return { - data: results.map((result) => result.data), - isPending: results.some((result) => result.isPending), - isLoading: results.some((result) => result.isLoading), - error: results.find((result) => result.isError), - } - }, - }) -}