@@ -97,13 +97,17 @@ export default function CertifyCardanoTransactionsModal({
97
97
} , [ client , currentStep , transactionsProofs , certificate ] ) ;
98
98
99
99
async function buildClient ( aggregator , genesisKey ) {
100
- const client = new MithrilClient ( aggregator , genesisKey ) ;
100
+ const client = new MithrilClient ( aggregator , genesisKey , {
101
+ // The following option activates the unstable features of the client.
102
+ // Unstable features will trigger an error if this option is not set.
103
+ unstable : true ,
104
+ } ) ;
101
105
setClient ( client ) ;
102
106
return client ;
103
107
}
104
108
105
109
async function getTransactionsProofsAndCertificate ( client , transactionHashes ) {
106
- const proofs = await client . unstable . get_cardano_transaction_proofs ( transactionHashes ) ;
110
+ const proofs = await client . get_cardano_transaction_proofs ( transactionHashes ) ;
107
111
const certificate = await client . get_mithril_certificate ( proofs . certificate_hash ) ;
108
112
109
113
setTransactionsProofs ( proofs ) ;
@@ -112,11 +116,10 @@ export default function CertifyCardanoTransactionsModal({
112
116
113
117
async function verifyTransactionProofAgainstCertificate ( client , transactionsProofs , certificate ) {
114
118
// Verify proof validity if so get its protocol message
115
- const protocolMessage =
116
- await client . unstable . verify_cardano_transaction_proof_then_compute_message (
117
- transactionsProofs ,
118
- certificate ,
119
- ) ;
119
+ const protocolMessage = await client . verify_cardano_transaction_proof_then_compute_message (
120
+ transactionsProofs ,
121
+ certificate ,
122
+ ) ;
120
123
const isProofValid =
121
124
( await client . verify_message_match_certificate ( protocolMessage , certificate ) ) === true ;
122
125
0 commit comments