diff --git a/explorer/client/src/pages/object-result/ObjectLoaded.tsx b/explorer/client/src/pages/object-result/ObjectLoaded.tsx
index 991fa25a3864d..fdb88c5154412 100644
--- a/explorer/client/src/pages/object-result/ObjectLoaded.tsx
+++ b/explorer/client/src/pages/object-result/ObjectLoaded.tsx
@@ -7,6 +7,7 @@ import DisplayBox from '../../components/displaybox/DisplayBox';
import Longtext from '../../components/longtext/Longtext';
import OwnedObjects from '../../components/ownedobjects/OwnedObjects';
import TxForID from '../../components/transactions-for-id/TxForID';
+import codestyle from '../../styles/bytecode.module.css';
import theme from '../../styles/theme.module.css';
import { type AddressOwner } from '../../utils/api/DefaultRpcClient';
import { parseImageURL } from '../../utils/objectUtils';
@@ -377,7 +378,9 @@ function ObjectLoaded({ data }: { data: DataType }) {
{properties.map(([key, value], index) => (
{prepLabel(key)}
-
{value}
+
+ {value}
+
))}
diff --git a/explorer/client/src/pages/object-result/ObjectResult.module.css b/explorer/client/src/pages/object-result/ObjectResult.module.css
index 25a1d28366135..a9fdd382d783d 100644
--- a/explorer/client/src/pages/object-result/ObjectResult.module.css
+++ b/explorer/client/src/pages/object-result/ObjectResult.module.css
@@ -89,6 +89,5 @@ div.bytecodebox > div > div:first-child {
}
div.bytecodebox > div > div:nth-child(2) {
- @apply overflow-auto h-[30vh] w-[65vw]
- border-solid border-stone-300 mt-[2vh] mb-[5vh] p-2 whitespace-pre text-sm;
+ @apply w-[65vw] h-[30vh] mt-[2vh] mb-[5vh];
}
diff --git a/explorer/client/src/pages/transaction-result/TransactionView.tsx b/explorer/client/src/pages/transaction-result/TransactionView.tsx
index 7e47d0d376202..3f487fd73d242 100644
--- a/explorer/client/src/pages/transaction-result/TransactionView.tsx
+++ b/explorer/client/src/pages/transaction-result/TransactionView.tsx
@@ -14,6 +14,7 @@ import {
import cl from 'classnames';
import Longtext from '../../components/longtext/Longtext';
+import codestyle from '../../styles/bytecode.module.css';
import { type DataType } from './TransactionResultType';
import type {
@@ -197,6 +198,46 @@ function formatByTransactionKind(
}
}
+function ItemView({ itm, text }: { itm: any; text: string }) {
+ switch (true) {
+ case itm.label === 'Modules':
+ return {itm.value}
;
+ case itm.link:
+ return (
+
+ );
+ default:
+ return <>{text}>;
+ }
+}
+
+function SubListView({ itm, list }: { itm: any; list: any }) {
+ return (
+
+ {list.map((sublist: string, l: number) => (
+
+
+ {itm.subLabel ? (
+
+ {itm.subLabel[l]}:
+
+ ) : (
+ ''
+ )}
+
+
+
+
+
+ ))}
+
+ );
+}
+
function TransactionView({ txdata }: { txdata: DataType }) {
return (
<>
@@ -231,120 +272,33 @@ function TransactionView({ txdata }: { txdata: DataType }) {
{itm.list ? (
{itm.value.map(
- (list: any, n: number) =>
- itm.sublist ? (
- -
-
- {list.map(
- (
- sublist: string,
- l: number
- ) => (
-
-
- {itm.subLabel ? (
-
- {
- itm
- .subLabel[
- l
- ]
- }
-
- :
-
- ) : (
- ''
- )}
-
- {itm.link ? (
-
- ) : (
- sublist
- )}
-
-
-
- )
- )}
-
-
- ) : (
- -
- {itm.link ? (
-
- ) : (
- list
- )}
-
- )
+ (list: any, n: number) => (
+ -
+ {itm.sublist ? (
+
+ ) : (
+
+ )}
+
+ )
)}
- ) : itm.link ? (
-
- ) : (
- itm.value
)}
diff --git a/explorer/client/src/styles/bytecode.module.css b/explorer/client/src/styles/bytecode.module.css
new file mode 100644
index 0000000000000..95e177e44f378
--- /dev/null
+++ b/explorer/client/src/styles/bytecode.module.css
@@ -0,0 +1,3 @@
+div.code {
+ @apply overflow-auto border-solid border-stone-300 p-2 whitespace-pre text-sm h-[30vh];
+}