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

Added Utxos and fix for clear big transactions in disk

parent 97a024ad
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,7 @@ import 'data/models/node_type.dart'; ...@@ -44,6 +44,7 @@ import 'data/models/node_type.dart';
import 'data/models/payment_cubit.dart'; import 'data/models/payment_cubit.dart';
import 'data/models/theme_cubit.dart'; import 'data/models/theme_cubit.dart';
import 'data/models/transaction_cubit_remove.dart'; import 'data/models/transaction_cubit_remove.dart';
import 'data/models/utxo_cubit.dart';
import 'g1/api.dart'; import 'g1/api.dart';
import 'g1/g1_helper.dart'; import 'g1/g1_helper.dart';
import 'shared_prefs_helper.dart'; import 'shared_prefs_helper.dart';
...@@ -153,8 +154,8 @@ void main() async { ...@@ -153,8 +154,8 @@ void main() async {
create: (BuildContext context) => NodeListCubit()), create: (BuildContext context) => NodeListCubit()),
BlocProvider<ContactsCubit>( BlocProvider<ContactsCubit>(
create: (BuildContext context) => ContactsCubit()), create: (BuildContext context) => ContactsCubit()),
/* BlocProvider<UtxoCubit>( BlocProvider<UtxoCubit>(
create: (BuildContext context) => UtxoCubit()), */ create: (BuildContext context) => UtxoCubit()),
// TODO(vjrj): Remove when clean the state of this after upgrades // TODO(vjrj): Remove when clean the state of this after upgrades
BlocProvider<TransactionCubitRemove>( BlocProvider<TransactionCubitRemove>(
create: (BuildContext context) => TransactionCubitRemove()), create: (BuildContext context) => TransactionCubitRemove()),
...@@ -362,6 +363,7 @@ class _GinkgoAppState extends State<GinkgoApp> { ...@@ -362,6 +363,7 @@ class _GinkgoAppState extends State<GinkgoApp> {
// Only after at least the action method is set, the notification events are delivered // Only after at least the action method is set, the notification events are delivered
NotificationController.startListeningNotificationEvents(); NotificationController.startListeningNotificationEvents();
// Wipe Old Transactions Cubit // Wipe Old Transactions Cubit
context.read<TransactionCubitRemove>().clear();
context.read<TransactionCubitRemove>().close(); context.read<TransactionCubitRemove>().close();
Once.runHourly('load_nodes', callback: () async { Once.runHourly('load_nodes', callback: () async {
final bool isConnected = final bool isConnected =
...@@ -386,6 +388,10 @@ class _GinkgoAppState extends State<GinkgoApp> { ...@@ -386,6 +388,10 @@ class _GinkgoAppState extends State<GinkgoApp> {
logger('resize avatar via once'); logger('resize avatar via once');
context.read<ContactsCubit>().resizeAvatars(); context.read<ContactsCubit>().resizeAvatars();
}); });
Once.runDaily('clear_tx_cubit', callback: () {
logger('clear tx cubit via once');
context.read<MultiWalletTransactionCubit>().clearState();
});
initGetItAll(); initGetItAll();
......
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