Skip to content

Commit 649d4bb

Browse files
committed
Display correctly certificate chain validation error
Before an empty text was display.
1 parent bca4ba0 commit 649d4bb

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ export default function TransactionCertificationResult({
9090
</Alert>
9191
) : (
9292
<Alert variant="danger" className="mb-2">
93-
<Alert.Heading>Mithril could not certify the transactions</Alert.Heading>
93+
<Alert.Heading>
94+
<i className="text-danger bi bi-shield-slash"></i> Mithril could not certify the
95+
transactions
96+
</Alert.Heading>
9497
<p className="mb-1">
9598
Either the transactions proof is invalid or all the transactions are not certified.
9699
</p>

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useState } from "react";
2-
import { Spinner, Table } from "react-bootstrap";
2+
import { Alert, Spinner, Table } from "react-bootstrap";
33
import { formatProcessDuration } from "@/utils";
44
import CopyableHash from "#/CopyableHash";
55
import CopyButton from "#/CopyButton";
@@ -89,7 +89,7 @@ export default function CertificateVerifier({
8989

9090
verifyCertificateChain(client, certificate.hash)
9191
.catch((err) => {
92-
console.error("Certificate Chain verification error", err);
92+
console.error("Certificate Chain verification error:\n", err);
9393
setValidationError(err);
9494
})
9595
.finally(() => setCurrentStep(certificateValidationSteps.done));
@@ -211,13 +211,12 @@ export default function CertificateVerifier({
211211
<div key={evt.id}>{evt.message}</div>
212212
))}
213213
{validationError !== undefined && (
214-
<tr>
215-
<td colSpan={2}>
216-
<i className="text-danger bi bi-x-circle-fill"></i> Invalid certificate chain:
217-
<br />
218-
{validationError.message}
219-
</td>
220-
</tr>
214+
<Alert variant="danger" className="mt-2">
215+
<Alert.Heading>
216+
<i className="text-danger bi bi-shield-slash"></i> Invalid certificate chain
217+
</Alert.Heading>
218+
<div className={styles.error}>{validationError.toString()}</div>
219+
</Alert>
221220
)}
222221
</div>
223222
</div>

mithril-explorer/src/components/VerifyCertificate/styles.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@
1111
.events > span {
1212
flex: 1 1 0;
1313
}
14+
15+
.error {
16+
white-space: pre-wrap;
17+
}

0 commit comments

Comments
 (0)