Skip to content

Commit cb42be1

Browse files
committed
fix(explorer): adapt to certificate beacon removal
Else explorer crash with a `e.beacon is undefined` logged in the console.
1 parent 5d38bce commit cb42be1

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

mithril-explorer/src/components/Artifacts/CertificatesList/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import React, { useEffect, useState } from "react";
22
import { useSelector } from "react-redux";
33
import { Badge, Button, Card, Col, Container, ListGroup, Row, Stack } from "react-bootstrap";
44
import CertificateModal from "#/CertificateModal";
5-
import RawJsonButton from "#/RawJsonButton";
65
import LocalDateTime from "#/LocalDateTime";
6+
import RawJsonButton from "#/RawJsonButton";
7+
import SignedEntityType from "#/SignedEntityType";
78
import { selectedAggregator } from "@/store/settingsSlice";
89

910
export default function CertificatesList(props) {
@@ -77,9 +78,13 @@ export default function CertificatesList(props) {
7778
Show
7879
</Button>
7980
</ListGroup.Item>
80-
<ListGroup.Item>Epoch: {certificate.beacon.epoch}</ListGroup.Item>
81+
<ListGroup.Item>Epoch: {certificate.epoch}</ListGroup.Item>
8182
<ListGroup.Item>
82-
Immutable file number: {certificate.beacon.immutable_file_number}
83+
Beacon:{" "}
84+
<SignedEntityType
85+
signedEntityType={certificate.signed_entity_type}
86+
table
87+
/>
8388
</ListGroup.Item>
8489
<ListGroup.Item>
8590
Number of signers: {certificate.metadata.total_signers}
@@ -100,7 +105,7 @@ export default function CertificatesList(props) {
100105
<Badge bg="primary">Latest</Badge>{" "}
101106
</>
102107
)}
103-
<Badge bg="secondary">{certificate.beacon.network}</Badge>
108+
<Badge bg="secondary">{certificate.metadata.network}</Badge>
104109

105110
<RawJsonButton
106111
href={`${aggregator}/certificate/${certificate.hash}`}

mithril-explorer/src/components/CertifyCardanoTransactionsModal/TransactionCertificationResult.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ function CertifiedDataBeacon({ certificate }) {
1212
<ListGroup horizontal>
1313
<ListGroup.Item>
1414
<span className="fst-italic">Epoch: </span>
15-
{certificate.beacon.epoch}
15+
{certificate.epoch}
1616
</ListGroup.Item>
1717
<ListGroup.Item>
18-
<span className="fst-italic">Immutable File Number: </span>
19-
{certificate.beacon.immutable_file_number}
18+
<span className="fst-italic">Block number: </span>
19+
{certificate.signed_entity_type.CardanoTransactions[1]}
2020
</ListGroup.Item>
2121
</ListGroup>
2222
</>

mithril-explorer/src/components/VerifyCertificate/CertificateVerifier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default function CertificateVerifier({
147147
linkVariant="primary"
148148
/>
149149
</div>
150-
<div>Epoch: {certificate.beacon.epoch}</div>
150+
<div>Epoch: {certificate.epoch}</div>
151151
<div className="d-flex justify-content-between">
152152
<div>
153153
Sealed at: <LocalDateTime datetime={certificate.metadata.sealed_at} />

0 commit comments

Comments
 (0)