From 450f2e72f3c2b4a6d37c74bc6fb460495482d1f8 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sat, 18 Sep 2021 15:25:30 -0300 Subject: [PATCH] Split log display modes --- src/transaction/LogEntry.tsx | 93 ++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 37 deletions(-) diff --git a/src/transaction/LogEntry.tsx b/src/transaction/LogEntry.tsx index a41f070..3d8312b 100644 --- a/src/transaction/LogEntry.tsx +++ b/src/transaction/LogEntry.tsx @@ -1,7 +1,9 @@ -import React from "react"; +import React, { Fragment } from "react"; import { Log } from "@ethersproject/abstract-provider"; import { LogDescription } from "@ethersproject/abi"; +import { Tab } from "@headlessui/react"; import DecoratedAddressLink from "../components/DecoratedAddressLink"; +import ModeTab from "../components/ModeTab"; import DecodedLog from "./DecodedLog"; import DecodedLogSignature from "./DecodedLogSignature"; import { TransactionData } from "../types"; @@ -31,43 +33,60 @@ const LogEntry: React.FC = ({ txData, log, logDesc }) => ( /> - {logDesc && ( -
-
Signature
-
- + + +
+ Decoded + Raw
-
- )} - {logDesc && ( -
-
Name
-
- -
-
- )} - {log.topics.map((t, i) => ( -
-
{i === 0 && "Topics"}
-
- - {i} - - {t} -
-
- ))} -
-
Data
-
-