File tree 3 files changed +19
-2
lines changed
src-gui/src/renderer/components/alert
3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,12 @@ export default function DaemonStatusAlert() {
57
57
Opening the local database
58
58
</ LoadingSpinnerAlert >
59
59
) ;
60
+ case "EstablishingTorCircuits" :
61
+ return (
62
+ < LoadingSpinnerAlert severity = "warning" >
63
+ Connecting to the Tor network
64
+ </ LoadingSpinnerAlert >
65
+ ) ;
60
66
}
61
67
break ;
62
68
case "Available" :
Original file line number Diff line number Diff line change @@ -366,7 +366,17 @@ impl ContextBuilder {
366
366
}
367
367
}
368
368
369
- let tor = init_tor_client ( & data_dir) . await ?;
369
+ self . tauri_handle
370
+ . emit_context_init_progress_event ( TauriContextStatusEvent :: Initializing (
371
+ TauriContextInitializationProgress :: EstablishingTorCircuits ,
372
+ ) ) ;
373
+
374
+ let tor = init_tor_client ( & data_dir)
375
+ . await
376
+ . inspect_err ( |err| {
377
+ tracing:: error!( %err, "Failed to establish Tor client" ) ;
378
+ } )
379
+ . ok ( ) ;
370
380
371
381
let context = Context {
372
382
db,
@@ -385,7 +395,7 @@ impl ContextBuilder {
385
395
swap_lock,
386
396
tasks : Arc :: new ( PendingTaskList :: default ( ) ) ,
387
397
tauri_handle : self . tauri_handle ,
388
- tor_client : Some ( tor) ,
398
+ tor_client : tor,
389
399
} ;
390
400
391
401
Ok ( context)
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ pub enum TauriContextInitializationProgress {
123
123
} ,
124
124
OpeningMoneroWallet ,
125
125
OpeningDatabase ,
126
+ EstablishingTorCircuits ,
126
127
}
127
128
128
129
#[ typeshare]
You can’t perform that action at this time.
0 commit comments