diff --git a/src/transaction/LogEntry.tsx b/src/transaction/LogEntry.tsx index 0ce96dd..1d4e85f 100644 --- a/src/transaction/LogEntry.tsx +++ b/src/transaction/LogEntry.tsx @@ -50,7 +50,19 @@ const LogEntry: React.FC = ({ txData, log, logDesc }) => ( - {logDesc && ( + {logDesc === undefined ? ( +
+
+ Waiting for data... +
+
+ ) : logDesc === null ? ( +
+
+ No decoded data +
+
+ ) : ( <>
diff --git a/src/transaction/Logs.tsx b/src/transaction/Logs.tsx index 72258f0..45fe491 100644 --- a/src/transaction/Logs.tsx +++ b/src/transaction/Logs.tsx @@ -33,7 +33,7 @@ const Logs: React.FC = ({ txData, metadata }) => { 1, sourcifySource ); - const logDesc = useMemo(() => { + const logDescs = useMemo(() => { if (!txData) { return undefined; } @@ -41,7 +41,7 @@ const Logs: React.FC = ({ txData, metadata }) => { return txData.confirmedData?.logs.map((l) => { const mt = metadatas[l.address]; if (!mt) { - return undefined; + return mt; } const abi = mt.output.abi; @@ -69,7 +69,7 @@ const Logs: React.FC = ({ txData, metadata }) => { key={i} txData={txData} log={l} - logDesc={logDesc?.[i]} + logDesc={logDescs?.[i]} /> ))}