From cb42be1d3a97882248fb32a9ad1eab7769e3b697 Mon Sep 17 00:00:00 2001 From: DJO <790521+Alenar@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:37:05 +0100 Subject: [PATCH 1/2] fix(explorer): adapt to certificate beacon removal Else explorer crash with a `e.beacon is undefined` logged in the console. --- .../components/Artifacts/CertificatesList/index.js | 13 +++++++++---- .../TransactionCertificationResult.js | 6 +++--- .../VerifyCertificate/CertificateVerifier.js | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/mithril-explorer/src/components/Artifacts/CertificatesList/index.js b/mithril-explorer/src/components/Artifacts/CertificatesList/index.js index 9a9a5a9650d..1704c474aa4 100644 --- a/mithril-explorer/src/components/Artifacts/CertificatesList/index.js +++ b/mithril-explorer/src/components/Artifacts/CertificatesList/index.js @@ -2,8 +2,9 @@ import React, { useEffect, useState } from "react"; import { useSelector } from "react-redux"; import { Badge, Button, Card, Col, Container, ListGroup, Row, Stack } from "react-bootstrap"; import CertificateModal from "#/CertificateModal"; -import RawJsonButton from "#/RawJsonButton"; import LocalDateTime from "#/LocalDateTime"; +import RawJsonButton from "#/RawJsonButton"; +import SignedEntityType from "#/SignedEntityType"; import { selectedAggregator } from "@/store/settingsSlice"; export default function CertificatesList(props) { @@ -77,9 +78,13 @@ export default function CertificatesList(props) { Show - Epoch: {certificate.beacon.epoch} + Epoch: {certificate.epoch} - Immutable file number: {certificate.beacon.immutable_file_number} + Beacon:{" "} + Number of signers: {certificate.metadata.total_signers} @@ -100,7 +105,7 @@ export default function CertificatesList(props) { Latest{" "} )} - {certificate.beacon.network} + {certificate.metadata.network} Epoch: - {certificate.beacon.epoch} + {certificate.epoch} - Immutable File Number: - {certificate.beacon.immutable_file_number} + Block number: + {certificate.signed_entity_type.CardanoTransactions[1]} diff --git a/mithril-explorer/src/components/VerifyCertificate/CertificateVerifier.js b/mithril-explorer/src/components/VerifyCertificate/CertificateVerifier.js index 706fffefd6c..2b6db60e148 100644 --- a/mithril-explorer/src/components/VerifyCertificate/CertificateVerifier.js +++ b/mithril-explorer/src/components/VerifyCertificate/CertificateVerifier.js @@ -147,7 +147,7 @@ export default function CertificateVerifier({ linkVariant="primary" /> -
Epoch: {certificate.beacon.epoch}
+
Epoch: {certificate.epoch}
Sealed at: From 7246c53d78fccee830106fef9610301537a134fc Mon Sep 17 00:00:00 2001 From: DJO <790521+Alenar@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:41:20 +0100 Subject: [PATCH 2/2] chore: bump explorer version from `0.7.11` to `0.7.12` --- mithril-explorer/package-lock.json | 6 +++--- mithril-explorer/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mithril-explorer/package-lock.json b/mithril-explorer/package-lock.json index 0bb175cfe82..36dfbc9a87e 100644 --- a/mithril-explorer/package-lock.json +++ b/mithril-explorer/package-lock.json @@ -1,12 +1,12 @@ { "name": "mithril-explorer", - "version": "0.7.11", + "version": "0.7.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mithril-explorer", - "version": "0.7.11", + "version": "0.7.12", "dependencies": { "@mithril-dev/mithril-client-wasm": "file:../mithril-client-wasm/pkg", "@popperjs/core": "^2.11.8", @@ -36,7 +36,7 @@ }, "../mithril-client-wasm/pkg": { "name": "mithril-client-wasm", - "version": "0.5.3", + "version": "0.6.0", "license": "Apache-2.0" }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/mithril-explorer/package.json b/mithril-explorer/package.json index 0cde6ae540b..9f874178472 100644 --- a/mithril-explorer/package.json +++ b/mithril-explorer/package.json @@ -1,6 +1,6 @@ { "name": "mithril-explorer", - "version": "0.7.11", + "version": "0.7.12", "private": true, "scripts": { "dev": "next dev",