Move type

This commit is contained in:
Willian Mitsuda 2021-10-30 21:08:10 -03:00
parent 19f7af84a5
commit b8eea08f4d
4 changed files with 6 additions and 6 deletions

View File

@ -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<string, string>;
// Create and configure the main resolver
const _mainResolver = new CompositeAddressResolver();
_mainResolver.addResolver(new ENSAddressResolver());

View File

@ -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;

View File

@ -32,8 +32,6 @@ export type TransactionChunk = {
lastPage: boolean;
};
export type ENSReverseCache = Record<string, string>;
export type TransactionData = {
transactionHash: string;
from: string;

View File

@ -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,