From 3973f74d2b21fa5c7b6bcc707874f733ba45f7fe Mon Sep 17 00:00:00 2001 From: NIK Date: Wed, 14 Jan 2026 20:03:39 +0800 Subject: [PATCH 1/2] move provider to where it belongs --- .../high_security_get_started_screen.dart | 11 ----------- mobile-app/lib/providers/wallet_providers.dart | 12 +++++++++++- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/mobile-app/lib/features/main/screens/high_security/high_security_get_started_screen.dart b/mobile-app/lib/features/main/screens/high_security/high_security_get_started_screen.dart index 1dcb6a4f..92ffb4a0 100644 --- a/mobile-app/lib/features/main/screens/high_security/high_security_get_started_screen.dart +++ b/mobile-app/lib/features/main/screens/high_security/high_security_get_started_screen.dart @@ -12,17 +12,6 @@ import 'package:resonance_network_wallet/features/styles/app_text_theme.dart'; import 'package:resonance_network_wallet/providers/high_security_form_provider.dart'; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; -final highSecurityEstimatedFeeProvider = FutureProvider.family((ref, account) async { - final highSecurityService = ref.read(highSecurityServiceProvider); - // Invent fake parameters for estimation - final feeData = await highSecurityService.getHighSecuritySetupFee( - account, - account.accountId, // Use self as dummy guardian - const Duration(days: 14), // Fake duration - ); - return feeData.fee; -}); - class HighSecurityGetStartedScreen extends ConsumerWidget { final Account account; const HighSecurityGetStartedScreen({super.key, required this.account}); diff --git a/mobile-app/lib/providers/wallet_providers.dart b/mobile-app/lib/providers/wallet_providers.dart index 99c68c0d..f2bea310 100644 --- a/mobile-app/lib/providers/wallet_providers.dart +++ b/mobile-app/lib/providers/wallet_providers.dart @@ -117,9 +117,19 @@ BigInt _calculatePendingOutgoing(List pendingTransactio return totalOutgoing; } +// fetch high security config final highSecurityConfigProvider = FutureProvider.family((ref, account) async { final service = ref.watch(highSecurityServiceProvider); return service.getHighSecurityConfig(account.accountId); }); -// Deprecated legacy history providers removed in favor of unified pagination +final highSecurityEstimatedFeeProvider = FutureProvider.family((ref, account) async { + final highSecurityService = ref.read(highSecurityServiceProvider); + // Invent fake parameters for estimation + final feeData = await highSecurityService.getHighSecuritySetupFee( + account, + account.accountId, // Use self as dummy guardian + const Duration(days: 14), // Fake duration + ); + return feeData.fee; +}); From 3277449cd61ba9f7903838946f35270b4b78e024 Mon Sep 17 00:00:00 2001 From: NIK Date: Wed, 14 Jan 2026 20:26:37 +0800 Subject: [PATCH 2/2] change watch to read --- mobile-app/lib/providers/wallet_providers.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile-app/lib/providers/wallet_providers.dart b/mobile-app/lib/providers/wallet_providers.dart index f2bea310..451d52ec 100644 --- a/mobile-app/lib/providers/wallet_providers.dart +++ b/mobile-app/lib/providers/wallet_providers.dart @@ -119,7 +119,7 @@ BigInt _calculatePendingOutgoing(List pendingTransactio // fetch high security config final highSecurityConfigProvider = FutureProvider.family((ref, account) async { - final service = ref.watch(highSecurityServiceProvider); + final service = ref.read(highSecurityServiceProvider); return service.getHighSecurityConfig(account.accountId); });