@@ -77,13 +77,13 @@ public override void Dispose()
7777 {
7878 base . Dispose ( ) ;
7979
80- DiagnosticsContainer ? . Dispose ( ) ;
80+ DiagnosticsContainer . Dispose ( ) ;
8181
8282 // CompositeWeb3Provider disposes both authenticators internally
8383 // Don't dispose Web3Authenticator/EthereumApi separately as they reference the same composite
8484 CompositeWeb3Provider ? . Dispose ( ) ;
8585 IdentityCache ? . Dispose ( ) ;
86- Analytics ? . Dispose ( ) ;
86+ Analytics . Dispose ( ) ;
8787 }
8888
8989 public static async UniTask < BootstrapContainer > CreateAsync (
@@ -131,14 +131,17 @@ await bootstrapContainer.InitializeContainerAsync<BootstrapContainer, BootstrapS
131131 container . DiagnosticsContainer = DiagnosticsContainer . Create ( container . ReportHandlingSettings ) ;
132132 container . DiagnosticsContainer . AddSentryScopeConfigurator ( AddIdentityToSentryScope ) ;
133133
134- if ( container . IdentityCache . Identity != null )
135- UnityDiagnosticsCenter . Instance . SetWallet ( container . IdentityCache . Identity . Address ) ;
136-
137- container . IdentityCache . OnIdentityChanged += ( ) =>
134+ if ( container . IdentityCache != null )
138135 {
139136 if ( container . IdentityCache . Identity != null )
140137 UnityDiagnosticsCenter . Instance . SetWallet ( container . IdentityCache . Identity . Address ) ;
141- } ;
138+
139+ container . IdentityCache . OnIdentityChanged += ( ) =>
140+ {
141+ if ( container . IdentityCache . Identity != null )
142+ UnityDiagnosticsCenter . Instance . SetWallet ( container . IdentityCache . Identity . Address ) ;
143+ } ;
144+ }
142145
143146 var cdpClient = ChromeDevToolHandler . New ( applicationParametersParser . HasFlag ( AppArgsFlags . LAUNCH_CDP_MONITOR_ON_START ) ) ;
144147 WebRequestsContainer ? webRequestsContainer = await WebRequestsContainer . CreateAsync ( settingsContainer , identityCache , debugContainer . Builder , decentralandUrlsSource , cdpClient , container . DiagnosticsContainer . SentrySampler , container . RealmClock , ct ) ;
@@ -150,7 +153,7 @@ await bootstrapContainer.InitializeContainerAsync<BootstrapContainer, BootstrapS
150153
151154 void AddIdentityToSentryScope ( Scope scope )
152155 {
153- if ( container . IdentityCache . Identity != null )
156+ if ( container . IdentityCache ? . Identity != null )
154157 container . DiagnosticsContainer . Sentry ! . AddIdentityToScope ( scope , container . IdentityCache . Identity . Address ) ;
155158 }
156159 } ) ;
@@ -288,8 +291,8 @@ private static IReportsHandlingSettings ProvideReportHandlingSettingsAsync(Boots
288291 [ Serializable ]
289292 public class BootstrapSettings : IDCLPluginSettings
290293 {
291- [ field: SerializeField ] public ReportsHandlingSettings ReportHandlingSettingsDevelopment { get ; private set ; }
292- [ field: SerializeField ] public ReportsHandlingSettings ReportHandlingSettingsProduction { get ; private set ; }
293- [ field: SerializeField ] public BuildData BuildData { get ; private set ; }
294+ [ field: SerializeField ] public ReportsHandlingSettings ReportHandlingSettingsDevelopment { get ; private set ; } = null ! ;
295+ [ field: SerializeField ] public ReportsHandlingSettings ReportHandlingSettingsProduction { get ; private set ; } = null ! ;
296+ [ field: SerializeField ] public BuildData BuildData { get ; private set ; } = null ! ;
294297 }
295298}
0 commit comments