diff --git a/src/AddressTransactions.tsx b/src/AddressTransactions.tsx index c5b96a5..1970b8c 100644 --- a/src/AddressTransactions.tsx +++ b/src/AddressTransactions.tsx @@ -33,6 +33,7 @@ import { useENSCache } from "./useReverseCache"; import { useFeeToggler } from "./search/useFeeToggler"; import { SelectionContext, useSelection } from "./useSelection"; import { useMultipleETHUSDOracle } from "./usePriceOracle"; +import { useSourcify } from "./useSourcify"; type BlockParams = { addressOrName: string; @@ -180,6 +181,10 @@ const AddressTransactions: React.FC = () => { const [feeDisplay, feeDisplayToggler] = useFeeToggler(); const selectionCtx = useSelection(); + const rawMetadata = useSourcify( + checksummedAddress, + provider?.network.chainId + ); return ( @@ -287,7 +292,10 @@ const AddressTransactions: React.FC = () => { - + diff --git a/src/address/Contracts.tsx b/src/address/Contracts.tsx index bea7485..892fe67 100644 --- a/src/address/Contracts.tsx +++ b/src/address/Contracts.tsx @@ -4,18 +4,18 @@ import ContentFrame from "../ContentFrame"; import InfoRow from "../components/InfoRow"; import Contract from "./Contract"; import { RuntimeContext } from "../useRuntime"; -import { useSourcify } from "../useSourcify"; +import { Metadata } from "../useSourcify"; type ContractsProps = { checksummedAddress: string; + rawMetadata: Metadata | null | undefined; }; -const Contracts: React.FC = ({ checksummedAddress }) => { +const Contracts: React.FC = ({ + checksummedAddress, + rawMetadata, +}) => { const { provider } = useContext(RuntimeContext); - const rawMetadata = useSourcify( - checksummedAddress, - provider?.network.chainId - ); const [selected, setSelected] = useState(); useEffect(() => {