@@ -25,41 +25,41 @@ async fn test_message_board() {
25
25
let _ = wasm_bindgen_futures:: JsFuture :: from ( wasm_bindgen_rayon:: init_thread_pool ( 10 ) ) . await ;
26
26
let main_handler = thread:: Builder :: new ( )
27
27
. spawn_async ( || async {
28
- let mut w = WebWallet :: new ( "main" , "http://localhost:1234/mainnet" , 1 ) . unwrap ( ) ;
28
+ let mut w = WebWallet :: new ( "main" , "http://localhost:1234/mainnet" , 1 ) . unwrap ( ) ;
29
29
30
- let s = zcash_keys:: encoding:: decode_extended_full_viewing_key (
31
- constants:: mainnet:: HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY ,
32
- SAPLING_EFVK . trim ( ) ,
33
- )
34
- . unwrap ( ) ;
30
+ let s = zcash_keys:: encoding:: decode_extended_full_viewing_key (
31
+ constants:: mainnet:: HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY ,
32
+ SAPLING_EFVK . trim ( ) ,
33
+ )
34
+ . unwrap ( ) ;
35
35
36
- let ufvk = UnifiedFullViewingKey :: from_sapling_extended_full_viewing_key ( s) . unwrap ( ) ;
37
- let ufvk_str = ufvk. encode ( & Network :: MainNetwork ) ;
38
- let id = w. import_ufvk ( & ufvk_str, Some ( 2477329 ) ) . await . unwrap ( ) ;
39
- tracing:: info!( "Created account with id: {}" , id) ;
36
+ let ufvk = UnifiedFullViewingKey :: from_sapling_extended_full_viewing_key ( s) . unwrap ( ) ;
37
+ let ufvk_str = ufvk. encode ( & Network :: MainNetwork ) ;
38
+ let id = w. import_ufvk ( & ufvk_str, Some ( 2477329 ) ) . await . unwrap ( ) ;
39
+ tracing:: info!( "Created account with id: {}" , id) ;
40
40
41
- #[ cfg( not( feature = "sync2" ) ) ]
42
- {
43
- tracing:: info!( "Syncing wallet with our sync impl" ) ;
44
- w. sync ( & js_sys:: Function :: new_with_args (
45
- "scanned_to, tip" ,
46
- "console.log('Scanned: ', scanned_to, '/', tip)" ,
47
- ) )
48
- . await
49
- . unwrap ( ) ;
50
- }
51
- #[ cfg( feature = "sync2" ) ]
52
- {
53
- tracing:: info!( "Syncing wallet with sync2" ) ;
54
- w. sync2 ( ) . await . unwrap ( ) ;
55
- }
56
- tracing:: info!( "Syncing complete :)" ) ;
41
+ #[ cfg( not( feature = "sync2" ) ) ]
42
+ {
43
+ tracing:: info!( "Syncing wallet with our sync impl" ) ;
44
+ w. sync ( & js_sys:: Function :: new_with_args (
45
+ "scanned_to, tip" ,
46
+ "console.log('Scanned: ', scanned_to, '/', tip)" ,
47
+ ) )
48
+ . await
49
+ . unwrap ( ) ;
50
+ }
51
+ #[ cfg( feature = "sync2" ) ]
52
+ {
53
+ tracing:: info!( "Syncing wallet with sync2" ) ;
54
+ w. sync2 ( ) . await . unwrap ( ) ;
55
+ }
56
+ tracing:: info!( "Syncing complete :)" ) ;
57
+
58
+ let summary = w. get_wallet_summary ( ) . unwrap ( ) ;
59
+ tracing:: info!( "Wallet summary: {:?}" , summary) ;
60
+ } )
61
+ . unwrap ( )
62
+ . join_async ( ) ;
57
63
58
- let summary = w. get_wallet_summary ( ) . unwrap ( ) ;
59
- tracing:: info!( "Wallet summary: {:?}" , summary) ;
60
- } )
61
- . unwrap ( )
62
- . join_async ( ) ;
63
-
64
64
main_handler. await . unwrap ( ) ;
65
65
}
0 commit comments