@@ -170,14 +165,10 @@ const Details: React.FC
= ({
{txData.to ? (
) : txData.confirmedData === undefined ? (
@@ -186,16 +177,10 @@ const Details: React.FC = ({
) : (
-
-
-
+ resolvedAddresses={resolvedAddresses}
+ />
)}
diff --git a/src/transaction/LogEntry.tsx b/src/transaction/LogEntry.tsx
index 4e89ffd..d8bf1ea 100644
--- a/src/transaction/LogEntry.tsx
+++ b/src/transaction/LogEntry.tsx
@@ -2,8 +2,7 @@ import React, { useMemo } from "react";
import { Log } from "@ethersproject/abstract-provider";
import { Fragment, Interface, LogDescription } from "@ethersproject/abi";
import { Tab } from "@headlessui/react";
-import AddressHighlighter from "../components/AddressHighlighter";
-import DecoratedAddressLink from "../components/DecoratedAddressLink";
+import TransactionAddress from "../components/TransactionAddress";
import Copy from "../components/Copy";
import ModeTab from "../components/ModeTab";
import DecodedParamsTable from "./decoder/DecodedParamsTable";
@@ -63,15 +62,10 @@ const LogEntry: React.FC = ({
Address
diff --git a/src/transaction/decoder/AddressDecoder.tsx b/src/transaction/decoder/AddressDecoder.tsx
index 45fb30c..ae43ee1 100644
--- a/src/transaction/decoder/AddressDecoder.tsx
+++ b/src/transaction/decoder/AddressDecoder.tsx
@@ -1,31 +1,22 @@
import React from "react";
-import AddressHighlighter from "../../components/AddressHighlighter";
-import DecoratedAddressLink from "../../components/DecoratedAddressLink";
import Copy from "../../components/Copy";
-import { TransactionData } from "../../types";
import { ResolvedAddresses } from "../../api/address-resolver";
+import TransactionAddress from "../../components/TransactionAddress";
type AddressDecoderProps = {
r: any;
- txData: TransactionData;
resolvedAddresses?: ResolvedAddresses | undefined;
};
const AddressDecoder: React.FC = ({
r,
- txData,
resolvedAddresses,
}) => (
);
diff --git a/src/transaction/decoder/DecodedParamRow.tsx b/src/transaction/decoder/DecodedParamRow.tsx
index b2b0baf..677ceab 100644
--- a/src/transaction/decoder/DecodedParamRow.tsx
+++ b/src/transaction/decoder/DecodedParamRow.tsx
@@ -75,11 +75,7 @@ const DecodedParamRow: React.FC = ({
{paramType.baseType === "uint256" ? (
) : paramType.baseType === "address" ? (
-
+
) : paramType.baseType === "bool" ? (
) : paramType.baseType === "bytes" ? (
diff --git a/src/useSelectedTransaction.ts b/src/useSelectedTransaction.ts
new file mode 100644
index 0000000..8676a53
--- /dev/null
+++ b/src/useSelectedTransaction.ts
@@ -0,0 +1,9 @@
+import { createContext, useContext } from "react";
+import { TransactionData } from "./types";
+
+export const SelectedTransactionContext = createContext<
+ TransactionData | null | undefined
+>(undefined);
+
+export const useSelectedTransaction = () =>
+ useContext(SelectedTransactionContext);