File tree Expand file tree Collapse file tree 3 files changed +30
-30
lines changed
mithril-explorer/src/components
Artifacts/CardanoTransactionsSnapshotsList Expand file tree Collapse file tree 3 files changed +30
-30
lines changed Original file line number Diff line number Diff line change @@ -110,12 +110,9 @@ export default function CardanoTransactionsSnapshotsList(props) {
110
110
< Card . Body >
111
111
< Card . Title > { cardanoTransactionsSnapshot . hash } </ Card . Title >
112
112
< ListGroup variant = "flush" className = "data-list-group" >
113
+ < ListGroup . Item > Epoch: { cardanoTransactionsSnapshot . epoch } </ ListGroup . Item >
113
114
< ListGroup . Item >
114
- Epoch: { cardanoTransactionsSnapshot . beacon . epoch }
115
- </ ListGroup . Item >
116
- < ListGroup . Item >
117
- Immutable file number:{ " " }
118
- { cardanoTransactionsSnapshot . beacon . immutable_file_number }
115
+ Block Number: { cardanoTransactionsSnapshot . block_number }
119
116
</ ListGroup . Item >
120
117
< ListGroup . Item >
121
118
Merkle Root: { cardanoTransactionsSnapshot . merkle_root }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { selectedAggregator } from "@/store/settingsSlice";
7
7
import RawJsonButton from "#/RawJsonButton" ;
8
8
import Stake from "#/Stake" ;
9
9
import ProtocolParameters from "#/ProtocolParameters" ;
10
+ import SignedEntityType from "#/SignedEntityType" ;
10
11
import SignerTable from "#/SignerTable" ;
11
12
import VerifyCertificateModal from "#/VerifyCertificate/VerifyCertificateModal" ;
12
13
@@ -72,28 +73,7 @@ export default function CertificateModal({
72
73
< Row md = { 1 } xl = "auto" >
73
74
< Col xl = { 4 } className = "mb-3" >
74
75
< h4 > Beacon</ h4 >
75
- < Table className = "mb-3" >
76
- < tbody >
77
- < tr >
78
- < td >
79
- < em > Network:</ em >
80
- </ td >
81
- < td > { certificate . beacon . network } </ td >
82
- </ tr >
83
- < tr >
84
- < td >
85
- < em > Epoch:</ em >
86
- </ td >
87
- < td > { certificate . beacon . epoch } </ td >
88
- </ tr >
89
- < tr >
90
- < td >
91
- < em > Immutable File Number:</ em >
92
- </ td >
93
- < td > { certificate . beacon . immutable_file_number } </ td >
94
- </ tr >
95
- </ tbody >
96
- </ Table >
76
+ < SignedEntityType signedEntityType = { certificate . signed_entity_type } table />
97
77
< h4 > Protocol Parameters</ h4 >
98
78
< ProtocolParameters
99
79
className = "mb-3"
Original file line number Diff line number Diff line change 1
1
import React , { useEffect , useState } from "react" ;
2
- import { ListGroup } from "react-bootstrap" ;
2
+ import { ListGroup , Table } from "react-bootstrap" ;
3
3
4
- export default function SignedEntityType ( { signedEntityType } ) {
4
+ export default function SignedEntityType ( { signedEntityType, table = false } ) {
5
5
const [ entityName , setEntityName ] = useState ( "" ) ;
6
6
const [ beacon , setBeacon ] = useState ( { } ) ;
7
7
@@ -13,12 +13,35 @@ export default function SignedEntityType({ signedEntityType }) {
13
13
setBeacon ( {
14
14
epoch : signedEntityType [ type_name ] ,
15
15
} ) ;
16
+ } else if ( type_name === "CardanoTransactions" ) {
17
+ setBeacon ( {
18
+ epoch : signedEntityType [ type_name ] [ 0 ] ,
19
+ block_number : signedEntityType [ type_name ] [ 1 ] ,
20
+ } ) ;
16
21
} else {
17
22
setBeacon ( signedEntityType [ type_name ] ?? { } ) ;
18
23
}
19
24
} , [ signedEntityType ] ) ;
20
25
21
- return (
26
+ return table ? (
27
+ < Table className = "mb-3" >
28
+ < tbody >
29
+ < tr >
30
+ < td colSpan = { 2 } >
31
+ < h6 > { entityName } </ h6 >
32
+ </ td >
33
+ </ tr >
34
+ { Object . entries ( beacon ) . map ( ( [ key , value ] ) => (
35
+ < tr key = { key } >
36
+ < td >
37
+ < em > { key } :</ em >
38
+ </ td >
39
+ < td > { value } </ td >
40
+ </ tr >
41
+ ) ) }
42
+ </ tbody >
43
+ </ Table >
44
+ ) : (
22
45
< ListGroup >
23
46
< ListGroup . Item >
24
47
< h6 > { entityName } </ h6 >
You can’t perform that action at this time.
0 commit comments