From 43c1523772763c5638b46eb69c4f71db8e443784 Mon Sep 17 00:00:00 2001 From: apoorvlathey Date: Thu, 15 Jun 2023 01:52:25 +0530 Subject: [PATCH] allow debugging of calldata --- src/components/Body/TransactionRequests.tsx | 33 ++++++++++++++++++++- src/components/Body/index.tsx | 1 + 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/components/Body/TransactionRequests.tsx b/src/components/Body/TransactionRequests.tsx index cc0990d..a58225f 100644 --- a/src/components/Body/TransactionRequests.tsx +++ b/src/components/Body/TransactionRequests.tsx @@ -14,12 +14,14 @@ import { Tr, Th, Tbody, + Link, } from "@chakra-ui/react"; import { InfoIcon, ChevronDownIcon, ChevronUpIcon, DeleteIcon, + UnlockIcon, } from "@chakra-ui/icons"; import CopyToClipboard from "./CopyToClipboard"; import { TxnDataType } from "../../types"; @@ -41,14 +43,43 @@ const TD = ({ txt }: { txt: string }) => ( ); +const TData = ({ + calldata, + address, + networkId, +}: { + calldata: string; + address: string; + networkId: number; +}) => ( + + + + {slicedText(calldata)} + + + + + +); + interface TransactionRequestsParams { sendTxnData: TxnDataType[]; setSendTxnData: (value: TxnDataType[]) => void; + networkId: number; } function TransactionRequests({ sendTxnData, setSendTxnData, + networkId, }: TransactionRequestsParams) { const { isOpen: tableIsOpen, onToggle: tableOnToggle } = useDisclosure(); @@ -109,7 +140,7 @@ function TransactionRequests({ - + ))} diff --git a/src/components/Body/index.tsx b/src/components/Body/index.tsx index 0d401d7..82215ea 100644 --- a/src/components/Body/index.tsx +++ b/src/components/Body/index.tsx @@ -817,6 +817,7 @@ function Body() {