diff --git a/explorer/src/components/transaction/ProgramLogSection.tsx b/explorer/src/components/transaction/ProgramLogSection.tsx index 8142ea279d..72101543df 100644 --- a/explorer/src/components/transaction/ProgramLogSection.tsx +++ b/explorer/src/components/transaction/ProgramLogSection.tsx @@ -4,8 +4,10 @@ import { useTransactionDetails } from "providers/transactions"; import { ProgramLogsCardBody } from "components/ProgramLogsCardBody"; import { parseProgramLogs } from "utils/program-logs"; import { useCluster } from "providers/cluster"; +import { TableCardBody } from "components/common/TableCardBody"; export function ProgramLogSection({ signature }: SignatureProps) { + const [showRaw, setShowRaw] = React.useState(false); const { cluster, url } = useCluster(); const details = useTransactionDetails(signature); @@ -26,14 +28,27 @@ export function ProgramLogSection({ signature }: SignatureProps) {

Program Instruction Logs

+
{prettyLogs !== null ? ( - + showRaw ? ( + + ) : ( + + ) ) : (
Logs not supported for this transaction @@ -43,3 +58,15 @@ export function ProgramLogSection({ signature }: SignatureProps) { ); } + +const RawProgramLogs = ({ raw }: { raw: string[] }) => { + return ( + + + +
{JSON.stringify(raw, null, 2)}
+ + +
+ ); +};