@@ -23,7 +23,6 @@ import '../../../../../utilities/assets.dart';
2323import '../../../../../utilities/text_styles.dart' ;
2424import '../../../../../wallets/crypto_currency/crypto_currency.dart' ;
2525import '../../../../../wallets/isar/models/wallet_info.dart' ;
26- import '../../../../../wallets/isar/providers/all_wallets_info_provider.dart' ;
2726import '../../../../../wallets/isar/providers/wallet_info_provider.dart' ;
2827import '../../../../../wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart' ;
2928import '../../../../../widgets/custom_buttons/draggable_switch_button.dart' ;
@@ -379,7 +378,6 @@ class _MoreFeaturesDialogState extends ConsumerState<MoreFeaturesDialog> {
379378
380379 case WalletFeature .clearSparkCache:
381380 return _MoreFeaturesClearSparkCacheItem (
382- walletId: widget.walletId,
383381 cryptoCurrency: wallet.cryptoCurrency,
384382 );
385383
@@ -656,23 +654,21 @@ class _MoreFeaturesItemBase extends StatelessWidget {
656654 }
657655}
658656
659- class _MoreFeaturesClearSparkCacheItem extends ConsumerStatefulWidget {
657+ class _MoreFeaturesClearSparkCacheItem extends StatefulWidget {
660658 const _MoreFeaturesClearSparkCacheItem ({
661659 super .key,
662- required this .walletId,
663660 required this .cryptoCurrency,
664661 });
665662
666- final String walletId;
667663 final CryptoCurrency cryptoCurrency;
668664
669665 @override
670- ConsumerState <_MoreFeaturesClearSparkCacheItem > createState () =>
666+ State <_MoreFeaturesClearSparkCacheItem > createState () =>
671667 _MoreFeaturesClearSparkCacheItemState ();
672668}
673669
674670class _MoreFeaturesClearSparkCacheItemState
675- extends ConsumerState <_MoreFeaturesClearSparkCacheItem > {
671+ extends State <_MoreFeaturesClearSparkCacheItem > {
676672 bool _onPressedLock = false ;
677673
678674 static const label = "Reset Spark electrumx cache" ;
@@ -689,23 +685,6 @@ class _MoreFeaturesClearSparkCacheItemState
689685 await FiroCacheCoordinator .clearSharedCache (
690686 widget.cryptoCurrency.network,
691687 );
692- final isar = ref.read (mainDBProvider).isar;
693- final sparkWalletInfos = ref
694- .read (pAllWalletsInfo)
695- .where (
696- (info) =>
697- info.coin.identifier == widget.cryptoCurrency.identifier,
698- )
699- .toList ();
700- for (final info in sparkWalletInfos) {
701- await info.updateOtherData (
702- newEntries: {
703- WalletInfoKeys .firoSparkCacheSetBlockHashCache:
704- < String , String > {},
705- },
706- isar: isar,
707- );
708- }
709688 setState (() {
710689 // trigger rebuild for cache size display
711690 });
0 commit comments