@@ -37,6 +37,7 @@ export default function CertifyCardanoTransactionsModal({
37
37
const [ isCertificateChainValid , setIsCertificateChainValid ] = useState ( true ) ;
38
38
const [ currentStep , setCurrentStep ] = useState ( validationSteps . ready ) ;
39
39
const [ currentTab , setCurrentTab ] = useState ( getTabForStep ( validationSteps . ready ) ) ;
40
+ const [ currentError , setCurrentError ] = useState ( undefined ) ;
40
41
41
42
useEffect ( ( ) => {
42
43
setShowLoadingWarning ( false ) ;
@@ -124,6 +125,7 @@ export default function CertifyCardanoTransactionsModal({
124
125
125
126
function handleError ( error ) {
126
127
console . error ( "Cardano Transactions Certification Error:" , error ) ;
128
+ setCurrentError ( error ) ;
127
129
setCurrentStep ( validationSteps . done ) ;
128
130
}
129
131
@@ -219,14 +221,29 @@ export default function CertifyCardanoTransactionsModal({
219
221
) }
220
222
</ Tab . Pane >
221
223
< Tab . Pane eventKey = { getTabForStep ( validationSteps . done ) } >
222
- { currentStep === validationSteps . done && (
224
+ { currentStep === validationSteps . done && currentError === undefined && (
223
225
< TransactionCertificationResult
224
226
isSuccess = { isProofValid && isCertificateChainValid }
225
227
certificate = { certificate }
226
228
certifiedTransactions = { transactionsProofs . transactions_hashes }
227
229
nonCertifiedTransactions = { transactionsProofs . non_certified_transactions }
228
230
/>
229
231
) }
232
+ { currentStep === validationSteps . done && currentError !== undefined && (
233
+ < Alert variant = "danger" className = "mb-2" >
234
+ < Alert . Heading >
235
+ < i className = "text-danger bi bi-shield-slash" > </ i > Mithril could not
236
+ certify the transactions
237
+ </ Alert . Heading >
238
+ < p className = "mb-2" >
239
+ An error occurred during the verification process. Please try again.
240
+ </ p >
241
+ < hr />
242
+ < pre className = "mb-0" >
243
+ < code > { currentError . toString ( ) } </ code >
244
+ </ pre >
245
+ </ Alert >
246
+ ) }
230
247
</ Tab . Pane >
231
248
</ Tab . Content >
232
249
</ Col >
0 commit comments