@@ -24,7 +24,6 @@ mod transfer;
24
24
25
25
const DEFAULT_URL : & str = "https://api.explorer.provable.com/v1" ;
26
26
27
- use std:: panic:: { catch_unwind, AssertUnwindSafe } ;
28
27
use crate :: {
29
28
KeyPair ,
30
29
PrivateKey ,
@@ -43,10 +42,10 @@ use crate::{
43
42
VerifyingKeyNative ,
44
43
} ,
45
44
} ;
46
- use snarkvm_console:: network:: Network ;
47
- use snarkvm_console:: prelude:: ToBytes ;
45
+ use snarkvm_console:: { network:: Network , prelude:: ToBytes } ;
48
46
use snarkvm_synthesizer:: process:: { cost_in_microcredits_v2, deployment_cost} ;
49
47
use snarkvm_synthesizer_program:: StackKeys ;
48
+ use std:: panic:: { AssertUnwindSafe , catch_unwind} ;
50
49
51
50
use js_sys:: { Object , Reflect } ;
52
51
use std:: str:: FromStr ;
@@ -92,9 +91,7 @@ impl ProgramManager {
92
91
#[ wasm_bindgen( js_name = "loadInclusionProver" ) ]
93
92
pub fn load_inclusion_prover ( proving_key : ProvingKey ) {
94
93
let result = catch_unwind ( AssertUnwindSafe ( || {
95
- let bytes = ProvingKeyNative :: from ( proving_key)
96
- . to_bytes_le ( )
97
- . expect ( "failed to convert to bytes" ) ;
94
+ let bytes = ProvingKeyNative :: from ( proving_key) . to_bytes_le ( ) . expect ( "failed to convert to bytes" ) ;
98
95
<CurrentNetwork as Network >:: inclusion_proving_key ( Some ( bytes) ) ;
99
96
} ) ) ;
100
97
@@ -180,10 +177,10 @@ impl ProgramManager {
180
177
mod tests {
181
178
use super :: * ;
182
179
180
+ use crate :: Metadata ;
183
181
use js_sys:: { Object , Reflect } ;
184
182
use wasm_bindgen:: JsValue ;
185
183
use wasm_bindgen_test:: * ;
186
- use crate :: Metadata ;
187
184
188
185
pub const MULTIPLY_PROGRAM : & str = r#"// The 'multiply_test.aleo' program which is imported by the 'double_test.aleo' program.
189
186
program multiply_test.aleo;
@@ -251,7 +248,7 @@ function add_and_double:
251
248
assert ! ( process. contains_program( multiply_program. id( ) ) ) ;
252
249
assert ! ( process. contains_program( double_program. id( ) ) ) ;
253
250
}
254
-
251
+
255
252
#[ wasm_bindgen_test]
256
253
async fn test_load_inclusion_prover ( ) {
257
254
let inclusion_prover_url = Metadata :: inclusion ( ) . prover ;
0 commit comments