Properly differentiate pending/cant decode log data
This commit is contained in:
parent
380abf2adc
commit
13f32f8a35
|
@ -50,7 +50,19 @@ const LogEntry: React.FC<LogEntryProps> = ({ txData, log, logDesc }) => (
|
|||
</Tab.List>
|
||||
<Tab.Panels as={Fragment}>
|
||||
<Tab.Panel className="space-y-2">
|
||||
{logDesc && (
|
||||
{logDesc === undefined ? (
|
||||
<div className="grid grid-cols-12 gap-x-3 gap-y-5 text-sm">
|
||||
<div className="col-start-2 flex space-x-2 items-center col-span-11">
|
||||
Waiting for data...
|
||||
</div>
|
||||
</div>
|
||||
) : logDesc === null ? (
|
||||
<div className="grid grid-cols-12 gap-x-3 gap-y-5 text-sm">
|
||||
<div className="col-start-2 flex space-x-2 items-center col-span-11">
|
||||
No decoded data
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<div className="grid grid-cols-12 gap-x-3 gap-y-5 text-sm">
|
||||
<div className="col-start-2 flex space-x-2 items-center col-span-11 font-mono">
|
||||
|
|
|
@ -33,7 +33,7 @@ const Logs: React.FC<LogsProps> = ({ txData, metadata }) => {
|
|||
1,
|
||||
sourcifySource
|
||||
);
|
||||
const logDesc = useMemo(() => {
|
||||
const logDescs = useMemo(() => {
|
||||
if (!txData) {
|
||||
return undefined;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ const Logs: React.FC<LogsProps> = ({ 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<LogsProps> = ({ txData, metadata }) => {
|
|||
key={i}
|
||||
txData={txData}
|
||||
log={l}
|
||||
logDesc={logDesc?.[i]}
|
||||
logDesc={logDescs?.[i]}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue