diff --git a/lib/app_config/app_config.dart b/lib/app_config/app_config.dart index 8378cbfba7..e899958fa6 100644 --- a/lib/app_config/app_config.dart +++ b/lib/app_config/app_config.dart @@ -24,6 +24,9 @@ final Uri discordInviteUrl = Uri.parse('https://komodoplatform.com/discord'); /// Const to define if Bitrefill integration is enabled in the app. const bool isBitrefillIntegrationEnabled = false; +/// Controls whether asset icons are precached when the app starts. +const bool isIconPrecachingEnabled = false; + /// Const to define whether to show trading warning dialogs and notices. /// This can be used to control the display of trading-related warnings /// throughout the application. diff --git a/lib/bloc/app_bloc_root.dart b/lib/bloc/app_bloc_root.dart index b06509b3eb..77cba5473b 100644 --- a/lib/bloc/app_bloc_root.dart +++ b/lib/bloc/app_bloc_root.dart @@ -366,8 +366,10 @@ class _MyAppViewState extends State<_MyAppView> { void didChangeDependencies() { super.didChangeDependencies(); - final sdk = RepositoryProvider.of(context); - _precacheCoinIcons(sdk).ignore(); + if (isIconPrecachingEnabled) { + final sdk = RepositoryProvider.of(context); + _precacheCoinIcons(sdk).ignore(); + } } /// Hides the native app launch loader. Currently only implemented for web.