@@ -31,37 +31,31 @@ async fn test_get_and_scan_range() {
31
31
let id = w. create_account ( SEED , HD_INDEX , BIRTHDAY ) . await . unwrap ( ) ;
32
32
tracing:: info!( "Created account with id: {}" , id) ;
33
33
let w_clone = w. clone ( ) ;
34
- let main_handler = thread:: Builder :: new ( ) . spawn_async ( move || async {
35
- let w = w_clone;
36
- assert ! ( thread:: is_web_worker_thread( ) ) ;
37
-
38
-
39
- #[ cfg( not( feature = "sync2" ) ) ]
40
- {
41
- w. sync ( & js_sys:: Function :: new_with_args (
42
- "scanned_to, tip" ,
43
- "console.log('Scanned: ', scanned_to, '/', tip)" ,
44
- ) )
45
- . await
46
- . unwrap ( ) ;
47
- }
48
- #[ cfg( feature = "sync2" ) ]
49
- {
50
- tracing:: info!( "Syncing wallet with sync2" ) ;
51
- w. sync2 ( ) . await . unwrap ( ) ;
52
- }
53
- tracing:: info!( "Syncing complete :)" ) ;
54
-
55
- let summary = w. get_wallet_summary ( ) . await . unwrap ( ) ;
56
- tracing:: info!( "Wallet summary: {:?}" , summary) ;
57
-
58
- tracing:: info!( "Proposing a transaction" ) ;
59
- w. transfer ( SEED , 0 , "utest1z00xn09t4eyeqw9zmjss75sf460423dymgyfjn8rtlj26cffy0yad3eea82xekk24s00wnm38cvyrm2c6x7fxlc0ns4a5j7utgl6lchvglfvl9g9p56fqwzvzvj9d3z6r6ft88j654d7dj0ep6myq5duz9s8x78fdzmtx04d2qn8ydkxr4lfdhlkx9ktrw98gd97dateegrr68vl8xu" . to_string ( ) , 1000 ) . await . unwrap ( ) ;
60
- tracing:: info!( "Transaction proposed" ) ;
61
-
62
- let summary = w. get_wallet_summary ( ) . await . unwrap ( ) ;
63
- tracing:: info!( "Wallet summary: {:?}" , summary) ;
64
- } ) . unwrap ( ) . join_async ( ) ;
65
-
66
- main_handler. await . unwrap_throw ( ) ;
34
+ let w = w_clone;
35
+
36
+ #[ cfg( not( feature = "sync2" ) ) ]
37
+ {
38
+ w. sync ( & js_sys:: Function :: new_with_args (
39
+ "scanned_to, tip" ,
40
+ "console.log('Scanned: ', scanned_to, '/', tip)" ,
41
+ ) )
42
+ . await
43
+ . unwrap ( ) ;
44
+ }
45
+ #[ cfg( feature = "sync2" ) ]
46
+ {
47
+ tracing:: info!( "Syncing wallet with sync2" ) ;
48
+ w. sync2 ( ) . await . unwrap ( ) ;
49
+ }
50
+ tracing:: info!( "Syncing complete :)" ) ;
51
+
52
+ let summary = w. get_wallet_summary ( ) . await . unwrap ( ) ;
53
+ tracing:: info!( "Wallet summary: {:?}" , summary) ;
54
+
55
+ tracing:: info!( "Proposing a transaction" ) ;
56
+ w. transfer ( SEED , 0 , "utest1z00xn09t4eyeqw9zmjss75sf460423dymgyfjn8rtlj26cffy0yad3eea82xekk24s00wnm38cvyrm2c6x7fxlc0ns4a5j7utgl6lchvglfvl9g9p56fqwzvzvj9d3z6r6ft88j654d7dj0ep6myq5duz9s8x78fdzmtx04d2qn8ydkxr4lfdhlkx9ktrw98gd97dateegrr68vl8xu" . to_string ( ) , 1000 ) . await . unwrap ( ) ;
57
+ tracing:: info!( "Transaction proposed" ) ;
58
+
59
+ let summary = w. get_wallet_summary ( ) . await . unwrap ( ) ;
60
+ tracing:: info!( "Wallet summary: {:?}" , summary) ;
67
61
}
0 commit comments