File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed
Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,7 @@ namespace SYNCWallet;
1414
1515public static class MauiProgram
1616{
17- static ICommunication Communication { get ; set ; }
18- public static MauiApp MauiApp { get ; set ; }
17+ public static MauiApp MauiApp { get ; set ; }
1918
2019
2120 //TODO Clean all global dependebcuesm create a wraooer for all varibles and extract the hardware reading code to a serivce.
@@ -46,9 +45,6 @@ public static MauiApp CreateMauiApp()
4645
4746 MauiApp = builder . Build ( ) ;
4847
49- Communication = ServiceHelper . GetService < ICommunication > ( ) ;
50- Communication . Init ( ) ;
51-
5248 return MauiApp ;
5349
5450 }
Original file line number Diff line number Diff line change 6969 protected override async Task OnInitializedAsync ()
7070 {
7171
72- Communication = ServiceHelper .GetService <ICommunication >();
7372 AuthenicationHandler = ServiceHelper .GetService <IAuthenicationService >();
7473 HardwareService = ServiceHelper .GetService <IHardwareService >();
74+ Communication = ServiceHelper .GetService <ICommunication >();
7575
7676
77+ Communication .Init ();
7778 // Get Supported Devices
7879 Devices = HardwareService .GetSupportedDevices ();
7980
Original file line number Diff line number Diff line change @@ -48,11 +48,7 @@ public class Communication : ICommunication
4848 public string ShowLoader { get ; set ; }
4949 public string Receipt { get ; set ; }
5050
51- public Communication ( )
52- {
53- Utilities = ServiceHelper . GetService < IUtilities > ( ) ;
54- AuthenicationService = ServiceHelper . GetService < IAuthenicationService > ( ) ;
55- }
51+
5652
5753 public bool CheckConfigured ( )
5854 {
@@ -257,6 +253,8 @@ public void WriteState(string value)
257253
258254 public void Init ( )
259255 {
256+ Utilities = ServiceHelper . GetService < IUtilities > ( ) ;
257+ AuthenicationService = ServiceHelper . GetService < IAuthenicationService > ( ) ;
260258
261259 HideTokenList = "none" ;
262260 HideTokenSend = "none" ;
You can’t perform that action at this time.
0 commit comments