diff --git a/src/api/address-resolver/index.ts b/src/api/address-resolver/index.ts index 9bc5833..cc4fe1b 100644 --- a/src/api/address-resolver/index.ts +++ b/src/api/address-resolver/index.ts @@ -3,7 +3,7 @@ import { IAddressResolver } from "./address-resolver"; import { CompositeAddressResolver } from "./CompositeAddressResolver"; import { ENSAddressResolver } from "./ENSAddressResolver"; -export type ENSReverseCache = Record; +export type ResolvedAddresses = Record; // Create and configure the main resolver const _mainResolver = new CompositeAddressResolver(); @@ -14,14 +14,14 @@ export const mainResolver: IAddressResolver = _mainResolver; export const batchPopulate = async ( provider: BaseProvider, addresses: string[] -): Promise => { +): Promise => { const solvers: Promise[] = []; for (const a of addresses) { solvers.push(mainResolver.resolveAddress(provider, a)); } const results = await Promise.all(solvers); - const cache: ENSReverseCache = {}; + const cache: ResolvedAddresses = {}; for (let i = 0; i < results.length; i++) { const r = results[i]; if (r === undefined) { diff --git a/src/search/TransactionItem.tsx b/src/search/TransactionItem.tsx index 57fb7e4..3917e24 100644 --- a/src/search/TransactionItem.tsx +++ b/src/search/TransactionItem.tsx @@ -18,11 +18,11 @@ import { ProcessedTransaction } from "../types"; import { FeeDisplay } from "./useFeeToggler"; import { formatValue } from "../components/formatter"; import ETH2USDValue from "../components/ETH2USDValue"; -import { ENSReverseCache } from "../api/address-resolver"; +import { ResolvedAddresses } from "../api/address-resolver"; type TransactionItemProps = { tx: ProcessedTransaction; - ensCache?: ENSReverseCache; + ensCache?: ResolvedAddresses; selectedAddress?: string; feeDisplay: FeeDisplay; priceMap: Record; diff --git a/src/useReverseCache.ts b/src/useReverseCache.ts index 25d0774..e931e58 100644 --- a/src/useReverseCache.ts +++ b/src/useReverseCache.ts @@ -1,13 +1,13 @@ import { useState, useEffect } from "react"; import { JsonRpcProvider } from "@ethersproject/providers"; import { ProcessedTransaction } from "./types"; -import { batchPopulate, ENSReverseCache } from "./api/address-resolver"; +import { batchPopulate, ResolvedAddresses } from "./api/address-resolver"; export const useENSCache = ( provider?: JsonRpcProvider, page?: ProcessedTransaction[] ) => { - const [reverseCache, setReverseCache] = useState(); + const [reverseCache, setReverseCache] = useState(); useEffect(() => { if (!provider || !page) {