diff --git a/src/AddressTransactions.tsx b/src/AddressTransactions.tsx index 52432fd..6e014f8 100644 --- a/src/AddressTransactions.tsx +++ b/src/AddressTransactions.tsx @@ -16,18 +16,13 @@ import { faQuestionCircle } from "@fortawesome/free-regular-svg-icons/faQuestion import StandardFrame from "./StandardFrame"; import StandardSubtitle from "./StandardSubtitle"; import Copy from "./components/Copy"; -import ContentFrame from "./ContentFrame"; import NavTab from "./components/NavTab"; +import AddressTransactionResults from "./address/AddressTransactionResults"; import Contracts from "./address/Contracts"; -import UndefinedPageControl from "./search/UndefinedPageControl"; -import ResultHeader from "./search/ResultHeader"; -import PendingResults from "./search/PendingResults"; -import TransactionItem from "./search/TransactionItem"; import { SearchController } from "./search/search"; import { RuntimeContext } from "./useRuntime"; import { pageCollector, useResolvedAddresses } from "./useResolvedAddresses"; import { useFeeToggler } from "./search/useFeeToggler"; -import { SelectionContext, useSelection } from "./useSelection"; import { useMultipleETHUSDOracle } from "./usePriceOracle"; import { useAppConfigContext } from "./useAppConfig"; import { useMultipleMetadata } from "./useSourcify"; @@ -176,7 +171,6 @@ const AddressTransactions: React.FC = () => { const [feeDisplay, feeDisplayToggler] = useFeeToggler(); - const selectionCtx = useSelection(); const addresses = useMemo(() => { const _addresses: ChecksummedAddress[] = []; if (checksummedAddress) { @@ -273,65 +267,16 @@ const AddressTransactions: React.FC = () => { -
-
- {page === undefined ? ( - <>Waiting for search results... - ) : ( - <>{page.length} transactions on this page - )} -
- -
- - {page ? ( - - {page.map((tx) => ( - - ))} -
-
- {page === undefined ? ( - <>Waiting for search results... - ) : ( - <>{page.length} transactions on this page - )} -
- -
-
- ) : ( - - )} - + } /> void; + resolvedAddresses: ResolvedAddresses | undefined; + priceMap: Record; + metadatas: Record; +}; + +const AddressTransactionResults: React.FC = ({ + page, + checksummedAddress, + controller, + feeDisplay, + feeDisplayToggler, + resolvedAddresses, + priceMap, + metadatas, +}) => { + const selectionCtx = useSelection(); + + return ( + +
+
+ {page === undefined ? ( + <>Waiting for search results... + ) : ( + <>{page.length} transactions on this page + )} +
+ +
+ + {page ? ( + + {page.map((tx) => ( + + ))} +
+
+ {page === undefined ? ( + <>Waiting for search results... + ) : ( + <>{page.length} transactions on this page + )} +
+ +
+
+ ) : ( + + )} +
+ ); +}; + +export default AddressTransactionResults;