diff --git a/src/Transaction.tsx b/src/Transaction.tsx index 2fc69a2..a412d0b 100644 --- a/src/Transaction.tsx +++ b/src/Transaction.tsx @@ -49,7 +49,7 @@ const Transaction: React.FC = () => { const metadata = useSourcify( txData?.to, provider?.network.chainId, - SourcifySource.CUSTOM_SNAPSHOT_SERVER // TODO: use dynamic selector + SourcifySource.CENTRAL_SERVER // TODO: use dynamic selector ); const txDesc = useTransactionDescription(metadata, txData); diff --git a/src/transaction/Logs.tsx b/src/transaction/Logs.tsx index 875f268..a274c90 100644 --- a/src/transaction/Logs.tsx +++ b/src/transaction/Logs.tsx @@ -30,10 +30,10 @@ const Logs: React.FC = ({ txData, metadata }) => { baseMetadatas, logAddresses, 1, - SourcifySource.CUSTOM_SNAPSHOT_SERVER + SourcifySource.CENTRAL_SERVER // TODO: use dynamic selector ); const logDesc = useMemo(() => { - if (!metadata || !txData) { + if (!txData) { return undefined; } @@ -45,12 +45,17 @@ const Logs: React.FC = ({ txData, metadata }) => { const abi = mt.output.abi; const intf = new Interface(abi as any); - return intf.parseLog({ - topics: l.topics, - data: l.data, - }); + try { + return intf.parseLog({ + topics: l.topics, + data: l.data, + }); + } catch (err) { + console.warn("Couldn't find function signature", err); + return null; + } }); - }, [metadatas, metadata, txData]); + }, [metadatas, txData]); return (