Move type
This commit is contained in:
parent
19f7af84a5
commit
b8eea08f4d
|
@ -1,9 +1,10 @@
|
||||||
import { BaseProvider } from "@ethersproject/providers";
|
import { BaseProvider } from "@ethersproject/providers";
|
||||||
import { ENSReverseCache } from "../../types";
|
|
||||||
import { IAddressResolver } from "./address-resolver";
|
import { IAddressResolver } from "./address-resolver";
|
||||||
import { CompositeAddressResolver } from "./CompositeAddressResolver";
|
import { CompositeAddressResolver } from "./CompositeAddressResolver";
|
||||||
import { ENSAddressResolver } from "./ENSAddressResolver";
|
import { ENSAddressResolver } from "./ENSAddressResolver";
|
||||||
|
|
||||||
|
export type ENSReverseCache = Record<string, string>;
|
||||||
|
|
||||||
// Create and configure the main resolver
|
// Create and configure the main resolver
|
||||||
const _mainResolver = new CompositeAddressResolver();
|
const _mainResolver = new CompositeAddressResolver();
|
||||||
_mainResolver.addResolver(new ENSAddressResolver());
|
_mainResolver.addResolver(new ENSAddressResolver());
|
||||||
|
|
|
@ -14,10 +14,11 @@ import TransactionDirection, {
|
||||||
Flags,
|
Flags,
|
||||||
} from "../components/TransactionDirection";
|
} from "../components/TransactionDirection";
|
||||||
import TransactionValue from "../components/TransactionValue";
|
import TransactionValue from "../components/TransactionValue";
|
||||||
import { ENSReverseCache, ProcessedTransaction } from "../types";
|
import { ProcessedTransaction } from "../types";
|
||||||
import { FeeDisplay } from "./useFeeToggler";
|
import { FeeDisplay } from "./useFeeToggler";
|
||||||
import { formatValue } from "../components/formatter";
|
import { formatValue } from "../components/formatter";
|
||||||
import ETH2USDValue from "../components/ETH2USDValue";
|
import ETH2USDValue from "../components/ETH2USDValue";
|
||||||
|
import { ENSReverseCache } from "../api/address-resolver";
|
||||||
|
|
||||||
type TransactionItemProps = {
|
type TransactionItemProps = {
|
||||||
tx: ProcessedTransaction;
|
tx: ProcessedTransaction;
|
||||||
|
|
|
@ -32,8 +32,6 @@ export type TransactionChunk = {
|
||||||
lastPage: boolean;
|
lastPage: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ENSReverseCache = Record<string, string>;
|
|
||||||
|
|
||||||
export type TransactionData = {
|
export type TransactionData = {
|
||||||
transactionHash: string;
|
transactionHash: string;
|
||||||
from: string;
|
from: string;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { JsonRpcProvider } from "@ethersproject/providers";
|
import { JsonRpcProvider } from "@ethersproject/providers";
|
||||||
import { ENSReverseCache, ProcessedTransaction } from "./types";
|
import { ProcessedTransaction } from "./types";
|
||||||
import { batchPopulate } from "./api/address-resolver";
|
import { batchPopulate, ENSReverseCache } from "./api/address-resolver";
|
||||||
|
|
||||||
export const useENSCache = (
|
export const useENSCache = (
|
||||||
provider?: JsonRpcProvider,
|
provider?: JsonRpcProvider,
|
||||||
|
|
Loading…
Reference in New Issue