diff --git a/src/api/address-resolver/index.ts b/src/api/address-resolver/index.ts index a9b4ff6..9bc5833 100644 --- a/src/api/address-resolver/index.ts +++ b/src/api/address-resolver/index.ts @@ -1,9 +1,10 @@ import { BaseProvider } from "@ethersproject/providers"; -import { ENSReverseCache } from "../../types"; import { IAddressResolver } from "./address-resolver"; import { CompositeAddressResolver } from "./CompositeAddressResolver"; import { ENSAddressResolver } from "./ENSAddressResolver"; +export type ENSReverseCache = Record; + // Create and configure the main resolver const _mainResolver = new CompositeAddressResolver(); _mainResolver.addResolver(new ENSAddressResolver()); diff --git a/src/search/TransactionItem.tsx b/src/search/TransactionItem.tsx index 76e58e7..57fb7e4 100644 --- a/src/search/TransactionItem.tsx +++ b/src/search/TransactionItem.tsx @@ -14,10 +14,11 @@ import TransactionDirection, { Flags, } from "../components/TransactionDirection"; import TransactionValue from "../components/TransactionValue"; -import { ENSReverseCache, ProcessedTransaction } from "../types"; +import { ProcessedTransaction } from "../types"; import { FeeDisplay } from "./useFeeToggler"; import { formatValue } from "../components/formatter"; import ETH2USDValue from "../components/ETH2USDValue"; +import { ENSReverseCache } from "../api/address-resolver"; type TransactionItemProps = { tx: ProcessedTransaction; diff --git a/src/types.ts b/src/types.ts index 76a1944..12763bb 100644 --- a/src/types.ts +++ b/src/types.ts @@ -32,8 +32,6 @@ export type TransactionChunk = { lastPage: boolean; }; -export type ENSReverseCache = Record; - export type TransactionData = { transactionHash: string; from: string; diff --git a/src/useReverseCache.ts b/src/useReverseCache.ts index fa0ca1a..25d0774 100644 --- a/src/useReverseCache.ts +++ b/src/useReverseCache.ts @@ -1,7 +1,7 @@ import { useState, useEffect } from "react"; import { JsonRpcProvider } from "@ethersproject/providers"; -import { ENSReverseCache, ProcessedTransaction } from "./types"; -import { batchPopulate } from "./api/address-resolver"; +import { ProcessedTransaction } from "./types"; +import { batchPopulate, ENSReverseCache } from "./api/address-resolver"; export const useENSCache = ( provider?: JsonRpcProvider,