File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ async fn test_message_board() {
23
23
initialize ( ) ;
24
24
#[ cfg( feature = "wasm-parallel" ) ]
25
25
let _ = wasm_bindgen_futures:: JsFuture :: from ( wasm_bindgen_rayon:: init_thread_pool ( 10 ) ) . await ;
26
+ let w = WebWallet :: new ( "main" , "http://localhost:1234/mainnet" , 1 ) . unwrap ( ) ;
27
+ let w_clone = w. clone ( ) ;
26
28
let main_handler = thread:: Builder :: new ( )
27
- . spawn_async ( || async {
28
- let w = WebWallet :: new ( "main" , "http://localhost:1234/mainnet" , 1 ) . unwrap ( ) ;
29
-
29
+ . spawn_async ( move || async {
30
+ let w = w_clone;
30
31
let s = zcash_keys:: encoding:: decode_extended_full_viewing_key (
31
32
constants:: mainnet:: HRP_SAPLING_EXTENDED_FULL_VIEWING_KEY ,
32
33
SAPLING_EFVK . trim ( ) ,
Original file line number Diff line number Diff line change @@ -26,12 +26,15 @@ async fn test_get_and_scan_range() {
26
26
#[ cfg( feature = "wasm-parallel" ) ]
27
27
let _ = JsFuture :: from ( wasm_bindgen_rayon:: init_thread_pool ( 10 ) ) . await ;
28
28
assert ! ( !thread:: is_web_worker_thread( ) ) ;
29
- let main_handler = thread:: Builder :: new ( ) . spawn_async ( || async {
29
+ let w = WebWallet :: new ( "test" , "http://localhost:1234/testnet" , 1 ) . unwrap ( ) ;
30
+
31
+ let id = w. create_account ( SEED , HD_INDEX , BIRTHDAY ) . await . unwrap ( ) ;
32
+ tracing:: info!( "Created account with id: {}" , id) ;
33
+ let w_clone = w. clone ( ) ;
34
+ let main_handler = thread:: Builder :: new ( ) . spawn_async ( move || async {
35
+ let w = w_clone;
30
36
assert ! ( thread:: is_web_worker_thread( ) ) ;
31
- let w = WebWallet :: new ( "test" , "http://localhost:1234/testnet" , 1 ) . unwrap ( ) ;
32
37
33
- let id = w. create_account ( SEED , HD_INDEX , BIRTHDAY ) . await . unwrap ( ) ;
34
- tracing:: info!( "Created account with id: {}" , id) ;
35
38
36
39
#[ cfg( not( feature = "sync2" ) ) ]
37
40
{
You can’t perform that action at this time.
0 commit comments