Skip to content

Commit

Permalink
added txid to object page (MystenLabs#1793)
Browse files Browse the repository at this point in the history
* added txid to object page

* fix test

* fix test

* rm tx_digest list and update rename Transaction ID to Last Transaction ID
  • Loading branch information
Jibz1 authored May 4, 2022
1 parent 3f62783 commit 6a4a976
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions explorer/client/src/pages/object-result/ObjectLoaded.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,23 @@ function ObjectLoaded({ data }: { data: DataType }) {
/>
</div>
</div>
{data.data?.tx_digest && (
<div>
<div>Last Transaction ID</div>
<div id="transactionID">
<Longtext
text={data.data?.tx_digest}
category="transactions"
isLink={true}
/>
</div>
</div>
)}

<div>
<div>Version</div>
<div>{data.version}</div>
</div>

{data.readonly && (
<div>
<div>Read Only?</div>
Expand All @@ -249,7 +260,6 @@ function ObjectLoaded({ data }: { data: DataType }) {
)}
</div>
)}

<div>
<div>Type</div>
<div>{prepObjTypeValue(data.objType)}</div>
Expand Down Expand Up @@ -280,7 +290,6 @@ function ObjectLoaded({ data }: { data: DataType }) {
/>
</div>
)}

{data.ethAddress && (
<div>
<div>Ethereum Contract Address</div>
Expand Down
2 changes: 1 addition & 1 deletion explorer/client/src/pages/object-result/ObjectResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const DATATYPE_DEFAULT: DataType = {
data: {
contents: {},
owner: { ObjectOwner: [] },
tx_digest: [],
tx_digest: '',
},
loadState: 'pending',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type DataType = {
[key: string]: any;
};
owner?: { ObjectOwner: [] };
tx_digest?: number[] | string;
tx_digest?: string;
};
loadState?: string;
};
Expand Down

0 comments on commit 6a4a976

Please sign in to comment.