Skip to content
Snippets Groups Projects
Commit b722c314 authored by vjrj's avatar vjrj
Browse files

More logs and init by default

parent 4d731aba
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ import '../data/models/node_list_cubit.dart'; ...@@ -23,6 +23,7 @@ import '../data/models/node_list_cubit.dart';
import '../g1/api.dart'; import '../g1/api.dart';
import '../g1/currency.dart'; import '../g1/currency.dart';
import '../shared_prefs_helper.dart'; import '../shared_prefs_helper.dart';
import 'logger.dart';
import 'notification_controller.dart'; import 'notification_controller.dart';
import 'widgets/first_screen/circular_icon.dart'; import 'widgets/first_screen/circular_icon.dart';
...@@ -258,7 +259,7 @@ void initGetItAll() { ...@@ -258,7 +259,7 @@ void initGetItAll() {
} }
} }
Future<void> fetchTransactionsFromBackground([bool init = false]) async { Future<void> fetchTransactionsFromBackground([bool init = true]) async {
if (init) { if (init) {
await hydratedInit(); await hydratedInit();
if (SharedPreferencesHelper().cards.isEmpty) { if (SharedPreferencesHelper().cards.isEmpty) {
...@@ -277,12 +278,14 @@ Future<void> fetchTransactionsFromBackground([bool init = false]) async { ...@@ -277,12 +278,14 @@ Future<void> fetchTransactionsFromBackground([bool init = false]) async {
} }
} }
} }
loggerDev('Initialized background context');
final GetIt getIt = GetIt.instance; final GetIt getIt = GetIt.instance;
final AppCubit appCubit = getIt.get<AppCubit>(); final AppCubit appCubit = getIt.get<AppCubit>();
final MultiWalletTransactionCubit transCubit = final MultiWalletTransactionCubit transCubit =
getIt.get<MultiWalletTransactionCubit>(); getIt.get<MultiWalletTransactionCubit>();
final NodeListCubit nodeListCubit = getIt.get<NodeListCubit>(); final NodeListCubit nodeListCubit = getIt.get<NodeListCubit>();
for (final CesiumCard card in SharedPreferencesHelper().cards) { for (final CesiumCard card in SharedPreferencesHelper().cards) {
loggerDev('Fetching transactions for ${card.pubKey} in background');
transCubit.fetchTransactions(nodeListCubit, appCubit, pubKey: card.pubKey); transCubit.fetchTransactions(nodeListCubit, appCubit, pubKey: card.pubKey);
} }
if (inDevelopment) { if (inDevelopment) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment