diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2aaa813dd..83e51901a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,7 +28,7 @@ jobs: - name: Bootstrap Melos run: melos bootstrap - name: Check Formatting - run: melos exec -- dart format . --line-length=120 --set-exit-if-changed + run: melos exec -- dart format lib test --line-length=120 --set-exit-if-changed - name: Clean Flutter projects run: melos exec --concurrency=1 -- "flutter clean" - name: Analyze diff --git a/melos.yaml b/melos.yaml index eb33adc06..dba3cbace 100644 --- a/melos.yaml +++ b/melos.yaml @@ -8,82 +8,63 @@ ide: intellij: enabled: false -# Shared dependency versions across all packages +# Only path-based overrides go here. Melos 6.x propagates these to each +# package's pubspec_overrides.yaml during bootstrap. Hosted-package version +# pins must live in each package's own pubspec.yaml (melos doesn't propagate +# them for hosted packages). dependency_overrides: - # Workspace packages - local paths quantus_sdk: path: ./quantus_sdk - # Polkadart ecosystem - latest versions - polkadart: ^0.7.1 - polkadart_keyring: ^0.7.0 - polkadart_cli: ^0.7.1 - - # Crypto and encoding - latest versions - bip39_mnemonic: ^3.0.9 - crypto: ^3.0.6 - ss58: ^1.3.1 - convert: ^3.0.0 - - # HTTP and networking - http: ^1.4.0 - connectivity_plus: ^7.0.0 - - # Storage and preferences - shared_preferences: ^2.5.2 - flutter_secure_storage: ^10.1.0 - - # Math and utilities - decimal: ^3.2.2 - quiver: ^3.1.0 - hex: ^0.2.0 - intl: ^0.20.2 - path: ^1.9.1 - - # UI and Graphics (Flutter specific) - flutter_svg: ^2.2.0 - qr_flutter: ^4.1.0 - flash: ^3.1.1 - cupertino_icons: ^1.0.6 - - # Mobile/Flutter specific - video_player: ^2.10.0 - mobile_scanner: ^7.0.1 - flutter_native_splash: ^2.4.7 - flutter_launcher_icons: ^0.14.4 - image_picker: ^1.1.2 - permission_handler: ^12.0.1 - - # State management and architecture - provider: ^6.1.2 - hooks_riverpod: ^2.5.0 - flutter_hooks: ^0.21.2 - go_router: ^15.2.0 - - # Notifications and UI feedback - another_flushbar: ^1.10.2 - - # Development and tooling - logger: ^2.5.0 - path_provider: ^2.0.0 - - # Rust bridge - flutter_rust_bridge: ^2.11.1 - - # Dev dependencies - latest versions - flutter_lints: ^6.0.0 - test: ^1.25.0 +# Dependency placement convention: +# +# melos.yaml (this file) +# - Only path-based overrides for workspace packages (quantus_sdk). +# +# /pubspec.yaml `dependencies` +# - Lists ONLY packages this package directly imports. +# - Every entry has an explicit ^X.Y.Z pin. +# - For deps shared across packages, keep versions aligned manually. +# +# /pubspec.yaml `dev_dependencies` +# - Build/codegen/CLI tools (build_runner, polkadart_cli, +# flutter_native_splash, flutter_launcher_icons). +# - Lint/test tools (flutter_lints, mockito, custom_lint). +# +# Canonical shared versions (keep aligned across packages that declare them): +# polkadart ^0.7.3 # DO NOT UPDATE - newer versions are +# # incompatible with our ML-DSA signature +# # override, work completely differently, +# # and add no benefits. +# bip39_mnemonic ^4.0.1 +# convert ^3.1.2 +# http ^1.6.0 +# shared_preferences ^2.5.5 +# decimal ^3.2.4 +# path ^1.9.1 +# flutter_svg ^2.3.0 +# flash ^3.1.1 +# collection ^1.19.1 +# telemetrydecksdk ^3.0.0 +# flutter_lints ^6.0.0 scripts: - # Analyze all packages + # Analyze all packages (matches CI: flutter analyze with fatal infos) analyze: - description: Analyze all packages in the workspace - run: melos exec -- dart analyze . + description: Analyze all packages in the workspace (matches CI) + run: melos exec --concurrency=1 -- "flutter analyze . --fatal-infos" # Format all packages format: description: Format all packages in the workspace - run: melos exec -- dart format . --line-length=120 + run: melos exec -- dart format lib test --line-length=120 + + # Auto-apply lint fixes, then format + fix: + description: Auto-apply lint fixes (dart fix), then format + run: | + melos exec --concurrency=1 -- "dart fix --apply" + melos exec -- "dart format lib test --line-length=120" # Test all packages test: diff --git a/miner-app/analysis_options.yaml b/miner-app/analysis_options.yaml index f9c6c8fb2..f1b2866ef 100644 --- a/miner-app/analysis_options.yaml +++ b/miner-app/analysis_options.yaml @@ -1,28 +1,23 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml +formatter: + page_width: 120 + linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. rules: - avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + - always_declare_return_types + - avoid_empty_else + - prefer_const_constructors + - prefer_final_fields + - prefer_single_quotes + - use_null_aware_elements -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +analyzer: + exclude: + - "**/*.g.dart" + - "**/*.freezed.dart" + errors: + avoid_print: ignore # print is the most reliable way to debug the app + missing_required_param: error + missing_return: error + must_be_immutable: error diff --git a/miner-app/lib/features/miner/miner_dashboard_screen.dart b/miner-app/lib/features/miner/miner_dashboard_screen.dart index 75d5b6e68..12428fb3b 100644 --- a/miner-app/lib/features/miner/miner_dashboard_screen.dart +++ b/miner-app/lib/features/miner/miner_dashboard_screen.dart @@ -284,7 +284,7 @@ class _MinerDashboardScreenState extends State { SliverToBoxAdapter( child: UpdateBanner( updateProgress: _minerUpdateProgress, - version: _minerUpdateInfo.latestVersion ?? "undefined", + version: _minerUpdateInfo.latestVersion ?? 'undefined', message: 'New miner binary available!', onUpdate: _handleUpdateMiner, ), @@ -295,14 +295,14 @@ class _MinerDashboardScreenState extends State { child: UpdateBanner( updateProgress: _nodeUpdateProgress, backgroundColor: Colors.green.shade500, - version: _nodeUpdateInfo.latestVersion ?? "undefined", + version: _nodeUpdateInfo.latestVersion ?? 'undefined', message: 'New node binary available!', onUpdate: _handleUpdateNode, ), ), // Custom app bar with glass effect - MinerAppBar(), + const MinerAppBar(), // Main content SliverPadding( @@ -313,7 +313,7 @@ class _MinerDashboardScreenState extends State { Center( child: ConstrainedBox( - constraints: BoxConstraints(maxWidth: 400), + constraints: const BoxConstraints(maxWidth: 400), child: SizedBox( width: double.infinity, child: MinerControls( diff --git a/miner-app/lib/features/miner/miner_status.dart b/miner-app/lib/features/miner/miner_status.dart index 5afabe5f0..44c93d3dc 100644 --- a/miner-app/lib/features/miner/miner_status.dart +++ b/miner-app/lib/features/miner/miner_status.dart @@ -164,7 +164,7 @@ class _StatusBadgeState extends State<_StatusBadge> with TickerProviderStateMixi ? (Matrix4.identity()..rotateZ(_pulseAnimation.value)) : Matrix4.identity(), child: RotationTransition( - turns: widget.config.isAnimated ? _rotationController : AlwaysStoppedAnimation(0), + turns: widget.config.isAnimated ? _rotationController : const AlwaysStoppedAnimation(0), child: Icon(widget.config.icon, color: Colors.white, size: 18), ), ), diff --git a/miner-app/lib/features/settings/settings_screen.dart b/miner-app/lib/features/settings/settings_screen.dart index d484c34f2..967daef0f 100644 --- a/miner-app/lib/features/settings/settings_screen.dart +++ b/miner-app/lib/features/settings/settings_screen.dart @@ -438,11 +438,11 @@ class _SettingsScreenState extends State { builder: (context) => AlertDialog( backgroundColor: const Color(0xFF1C1C1C), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), - title: Row( + title: const Row( children: [ Icon(Icons.shield_outlined, color: Colors.orange, size: 24), - const SizedBox(width: 12), - const Text('Inner Hash', style: TextStyle(color: Colors.white, fontSize: 18)), + SizedBox(width: 12), + Text('Inner Hash', style: TextStyle(color: Colors.white, fontSize: 18)), ], ), content: SizedBox( @@ -460,7 +460,7 @@ class _SettingsScreenState extends State { ), child: Row( children: [ - Icon(Icons.warning_amber_rounded, color: Colors.orange, size: 20), + const Icon(Icons.warning_amber_rounded, color: Colors.orange, size: 20), const SizedBox(width: 8), Expanded( child: Text( diff --git a/miner-app/lib/features/setup/node_setup_screen.dart b/miner-app/lib/features/setup/node_setup_screen.dart index 6e86da7c1..6d89ca02a 100644 --- a/miner-app/lib/features/setup/node_setup_screen.dart +++ b/miner-app/lib/features/setup/node_setup_screen.dart @@ -18,8 +18,8 @@ class _NodeSetupScreenState extends State { bool _isLoading = true; bool _isDownloading = false; double _downloadProgress = 0.0; - String _downloadProgressText = ""; - String _currentDownloadingBinary = ""; + String _downloadProgressText = ''; + String _currentDownloadingBinary = ''; @override void initState() { @@ -60,7 +60,7 @@ class _NodeSetupScreenState extends State { _isLoading = true; _isDownloading = true; _downloadProgress = 0.0; - _downloadProgressText = "Starting downloads..."; + _downloadProgressText = 'Starting downloads...'; }); try { @@ -69,8 +69,8 @@ class _NodeSetupScreenState extends State { final nodeVersion = await BinaryManager.getLatestNodeVersion(); setState(() { - _currentDownloadingBinary = "Node Binary $nodeVersion"; - _downloadProgressText = "Downloading Node Binary..."; + _currentDownloadingBinary = 'Node Binary $nodeVersion'; + _downloadProgressText = 'Downloading Node Binary...'; }); await BinaryManager.ensureNodeBinary( @@ -80,10 +80,10 @@ class _NodeSetupScreenState extends State { if (progress.totalBytes > 0) { _downloadProgress = progress.downloadedBytes / progress.totalBytes; _downloadProgressText = - "Node: ${(progress.downloadedBytes / (1024 * 1024)).toStringAsFixed(2)} MB / ${(progress.totalBytes / (1024 * 1024)).toStringAsFixed(2)} MB"; + 'Node: ${(progress.downloadedBytes / (1024 * 1024)).toStringAsFixed(2)} MB / ${(progress.totalBytes / (1024 * 1024)).toStringAsFixed(2)} MB'; } else { _downloadProgress = progress.downloadedBytes > 0 ? 1.0 : 0.0; - _downloadProgressText = progress.downloadedBytes > 0 ? "Node Downloaded" : "Downloading Node..."; + _downloadProgressText = progress.downloadedBytes > 0 ? 'Node Downloaded' : 'Downloading Node...'; } }); } @@ -100,9 +100,9 @@ class _NodeSetupScreenState extends State { final minerVersion = await BinaryManager.getLatestMinerVersion(); setState(() { - _currentDownloadingBinary = "External Miner $minerVersion"; + _currentDownloadingBinary = 'External Miner $minerVersion'; _downloadProgress = 0.0; - _downloadProgressText = "Downloading External Miner..."; + _downloadProgressText = 'Downloading External Miner...'; }); await BinaryManager.ensureExternalMinerBinary( @@ -112,10 +112,10 @@ class _NodeSetupScreenState extends State { if (progress.totalBytes > 0) { _downloadProgress = progress.downloadedBytes / progress.totalBytes; _downloadProgressText = - "Miner: ${(progress.downloadedBytes / (1024 * 1024)).toStringAsFixed(2)} MB / ${(progress.totalBytes / (1024 * 1024)).toStringAsFixed(2)} MB"; + 'Miner: ${(progress.downloadedBytes / (1024 * 1024)).toStringAsFixed(2)} MB / ${(progress.totalBytes / (1024 * 1024)).toStringAsFixed(2)} MB'; } else { _downloadProgress = progress.downloadedBytes > 0 ? 1.0 : 0.0; - _downloadProgressText = progress.downloadedBytes > 0 ? "Miner Downloaded" : "Downloading Miner..."; + _downloadProgressText = progress.downloadedBytes > 0 ? 'Miner Downloaded' : 'Downloading Miner...'; } }); } @@ -131,7 +131,7 @@ class _NodeSetupScreenState extends State { if (mounted) { setState(() { _isDownloading = false; - _downloadProgressText = "All binaries installed successfully!"; + _downloadProgressText = 'All binaries installed successfully!'; }); } @@ -143,7 +143,7 @@ class _NodeSetupScreenState extends State { setState(() { _isLoading = false; _isDownloading = false; - _downloadProgressText = "Error: ${e.toString()}"; + _downloadProgressText = 'Error: ${e.toString()}'; }); } if (mounted) { @@ -198,23 +198,23 @@ class _NodeSetupScreenState extends State { const SizedBox(height: 16), const Text('Mining Software Installed!', style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)), const SizedBox(height: 8), - Column( + const Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Icon(Icons.check, color: Colors.green, size: 20), - const SizedBox(width: 8), - const Text('Node Binary'), + SizedBox(width: 8), + Text('Node Binary'), ], ), - const SizedBox(height: 4), + SizedBox(height: 4), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Icon(Icons.check, color: Colors.green, size: 20), - const SizedBox(width: 8), - const Text('External Miner'), + SizedBox(width: 8), + Text('External Miner'), ], ), ], diff --git a/miner-app/lib/src/services/binary_manager.dart b/miner-app/lib/src/services/binary_manager.dart index 5a25ca530..ca11db30d 100644 --- a/miner-app/lib/src/services/binary_manager.dart +++ b/miner-app/lib/src/services/binary_manager.dart @@ -205,7 +205,7 @@ class BinaryManager { static String _buildNodeDownloadUrl(String tag) { final target = _targetTriple(); - final extension = Platform.isWindows ? "zip" : "tar.gz"; + final extension = Platform.isWindows ? 'zip' : 'tar.gz'; final asset = '$_binary-$tag-$target.$extension'; return 'https://github.com/$_repoOwner/$_repoName/releases/download/$tag/$asset'; } @@ -329,7 +329,7 @@ class BinaryManager { // Pick asset name final target = _targetTriple(); - final extension = Platform.isWindows ? "zip" : "tar.gz"; + final extension = Platform.isWindows ? 'zip' : 'tar.gz'; final asset = '$_binary-$tag-$target.$extension'; final url = 'https://github.com/$_repoOwner/$_repoName/releases/download/$tag/$asset'; @@ -661,7 +661,7 @@ class BinaryManager { } } - static String _normalizeFilename(String file) => Platform.isWindows ? "$file.exe" : file; + static String _normalizeFilename(String file) => Platform.isWindows ? '$file.exe' : file; static Future _getCacheDir() async => Directory(p.join(await getQuantusHomeDirectoryPath(), 'bin')).create(recursive: true); diff --git a/miner-app/lib/src/services/miner_wallet_service.dart b/miner-app/lib/src/services/miner_wallet_service.dart index 94436eea9..ebad4a4d7 100644 --- a/miner-app/lib/src/services/miner_wallet_service.dart +++ b/miner-app/lib/src/services/miner_wallet_service.dart @@ -1,7 +1,6 @@ import 'dart:io'; import 'dart:math'; -import 'package:bip39_mnemonic/bip39_mnemonic.dart'; import 'package:quantus_miner/src/services/binary_manager.dart'; import 'package:quantus_miner/src/utils/app_logger.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; diff --git a/miner-app/lib/src/services/wormhole_claim_service.dart b/miner-app/lib/src/services/wormhole_claim_service.dart index 540c8adf9..19c02880a 100644 --- a/miner-app/lib/src/services/wormhole_claim_service.dart +++ b/miner-app/lib/src/services/wormhole_claim_service.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:typed_data'; import 'package:convert/convert.dart'; -import 'package:polkadart/scale_codec.dart' as scale; import 'package:quantus_miner/src/services/chain_rpc_client.dart'; import 'package:quantus_miner/src/utils/app_logger.dart'; import 'package:quantus_sdk/generated/planck/pallets/wormhole.dart' as wormhole_pallet; @@ -382,8 +381,8 @@ class WormholeClaimService { static List _encodeDigest(Map digest) { final logs = digest['logs'] as List? ?? []; - final output = scale.ByteOutput(256); - scale.CompactCodec.codec.encodeTo(logs.length, output); + final output = ByteOutput(256); + CompactCodec.codec.encodeTo(logs.length, output); for (final logEntry in logs) { final logHex = logEntry as String; output.write(_hexBytes(logHex)); @@ -392,8 +391,8 @@ class WormholeClaimService { } static Uint8List _compactEncode(int value) { - final output = scale.ByteOutput(5); - scale.CompactCodec.codec.encodeTo(value, output); + final output = ByteOutput(5); + CompactCodec.codec.encodeTo(value, output); return output.toBytes(); } } diff --git a/miner-app/lib/src/ui/logs_widget.dart b/miner-app/lib/src/ui/logs_widget.dart index 52e477fbb..8231089f1 100644 --- a/miner-app/lib/src/ui/logs_widget.dart +++ b/miner-app/lib/src/ui/logs_widget.dart @@ -228,12 +228,12 @@ class _LogsWidgetState extends State { children: [ Text('Total logs: ${_logs.length}', style: TextStyle(fontSize: 12, color: Colors.grey[600])), if (widget.orchestrator?.isMining ?? false) - Text( + const Text( 'Live', style: TextStyle(fontSize: 12, color: Colors.green, fontWeight: FontWeight.w500), ) else - Text('Not connected', style: TextStyle(fontSize: 12, color: Colors.grey)), + const Text('Not connected', style: TextStyle(fontSize: 12, color: Colors.grey)), ], ), ), diff --git a/miner-app/lib/src/ui/snackbar_helper.dart b/miner-app/lib/src/ui/snackbar_helper.dart index fa9719788..53c1ac914 100644 --- a/miner-app/lib/src/ui/snackbar_helper.dart +++ b/miner-app/lib/src/ui/snackbar_helper.dart @@ -50,7 +50,7 @@ Future showWarningSnackbar(BuildContext context, {required String title, r context, title: title, message: message, - icon: Icon(Icons.warning, color: Colors.amber), + icon: const Icon(Icons.warning, color: Colors.amber), ); } @@ -59,6 +59,6 @@ Future showErrorSnackbar(BuildContext context, {required String title, req context, title: title, message: message, - icon: Icon(Icons.warning, color: Colors.red), + icon: const Icon(Icons.warning, color: Colors.red), ); } diff --git a/miner-app/lib/src/utils/app_logger.dart b/miner-app/lib/src/utils/app_logger.dart index 276cc6029..ab3a1dfe6 100644 --- a/miner-app/lib/src/utils/app_logger.dart +++ b/miner-app/lib/src/utils/app_logger.dart @@ -43,17 +43,17 @@ class _AppLogPrinter extends LogPrinter { static final _levelColors = { Level.trace: AnsiColor.fg(AnsiColor.grey(0.5)), - Level.debug: AnsiColor.none(), - Level.info: AnsiColor.fg(12), // Light blue - Level.warning: AnsiColor.fg(208), // Orange - Level.error: AnsiColor.fg(196), // Red - Level.fatal: AnsiColor.fg(199), // Magenta + Level.debug: const AnsiColor.none(), + Level.info: const AnsiColor.fg(12), // Light blue + Level.warning: const AnsiColor.fg(208), // Orange + Level.error: const AnsiColor.fg(196), // Red + Level.fatal: const AnsiColor.fg(199), // Magenta }; @override List log(LogEvent event) { final prefix = _levelPrefixes[event.level] ?? '?'; - final color = _levelColors[event.level] ?? AnsiColor.none(); + final color = _levelColors[event.level] ?? const AnsiColor.none(); final time = _formatTime(event.time); final messageStr = event.message.toString(); diff --git a/miner-app/pubspec.lock b/miner-app/pubspec.lock index ead6462fd..c624f81f3 100644 --- a/miner-app/pubspec.lock +++ b/miner-app/pubspec.lock @@ -18,7 +18,7 @@ packages: source: hosted version: "1.0.0" analyzer: - dependency: transitive + dependency: "direct dev" description: name: analyzer sha256: de7148ed2fcec579b19f122c1800933dfa028f6d9fd38a152b04b1516cec120b @@ -58,7 +58,7 @@ packages: source: hosted version: "2.0.1" bip39_mnemonic: - dependency: "direct main" + dependency: transitive description: name: bip39_mnemonic sha256: dd6bdfc2547d986b2c00f99bba209c69c0b6fa5c1a185e1f728998282f1249d5 @@ -81,22 +81,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: "0730c18c770d05636a8f945c32a4d7d81cb6e0f0148c8db4ad12e7748f7e49af" - url: "https://pub.dev" - source: hosted - version: "8.12.5" characters: dependency: transitive description: @@ -137,14 +121,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: "6a6cab2ba4680d6423f34a9b972a4c9a94ebe1b62ecec4e1a1f2cba91fd1319d" - url: "https://pub.dev" - source: hosted - version: "4.11.1" collection: dependency: transitive description: @@ -201,14 +177,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.9.0" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "29f7ecc274a86d32920b1d9cfc7502fa87220da41ec60b55f329559d5732e2b2" - url: "https://pub.dev" - source: hosted - version: "3.1.7" dbus: dependency: transitive description: @@ -218,7 +186,7 @@ packages: source: hosted version: "0.7.12" decimal: - dependency: "direct main" + dependency: transitive description: name: decimal sha256: fc706a5618b81e5b367b01dd62621def37abc096f2b46a9bd9068b64c1fa36d0 @@ -273,38 +241,6 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.1" - file_selector_linux: - dependency: transitive - description: - name: file_selector_linux - sha256: "2567f398e06ac72dcf2e98a0c95df2a9edd03c2c2e0cacd4780f20cdf56263a0" - url: "https://pub.dev" - source: hosted - version: "0.9.4" - file_selector_macos: - dependency: transitive - description: - name: file_selector_macos - sha256: "5e0bbe9c312416f1787a68259ea1505b52f258c587f12920422671807c4d618a" - url: "https://pub.dev" - source: hosted - version: "0.9.5" - file_selector_platform_interface: - dependency: transitive - description: - name: file_selector_platform_interface - sha256: "35e0bd61ebcdb91a3505813b055b09b79dfdc7d0aee9c09a7ba59ae4bb13dc85" - url: "https://pub.dev" - source: hosted - version: "2.7.0" - file_selector_windows: - dependency: transitive - description: - name: file_selector_windows - sha256: "62197474ae75893a62df75939c777763d39c2bc5f73ce5b88497208bc269abfd" - url: "https://pub.dev" - source: hosted - version: "0.9.3+5" fixnum: dependency: transitive description: @@ -355,19 +291,6 @@ packages: url: "https://pub.dev" source: hosted version: "6.0.0" - flutter_localizations: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - sha256: "38d1c268de9097ff59cf0e844ac38759fc78f76836d37edad06fa21e182055a0" - url: "https://pub.dev" - source: hosted - version: "2.0.34" flutter_rust_bridge: dependency: transitive description: @@ -428,10 +351,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "1ded017b39c8e15c8948ea855070a5ff8ff8b3d5e83f3446e02d6bb12add7ad9" + sha256: "35882981abcbfb8c15b286f0cd690ff25bac12d95eff3e25ee207f37d4c42e7f" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.3.0" flutter_test: dependency: "direct dev" description: flutter @@ -512,70 +435,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.0" - image_picker: - dependency: "direct main" - description: - name: image_picker - sha256: "784210112be18ea55f69d7076e2c656a4e24949fa9e76429fe53af0c0f4fa320" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - image_picker_android: - dependency: transitive - description: - name: image_picker_android - sha256: "66810af8e99b2657ee98e5c6f02064f69bb63f7a70e343937f70946c5f8c6622" - url: "https://pub.dev" - source: hosted - version: "0.8.13+16" - image_picker_for_web: - dependency: transitive - description: - name: image_picker_for_web - sha256: "66257a3191ab360d23a55c8241c91a6e329d31e94efa7be9cf7a212e65850214" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - image_picker_ios: - dependency: transitive - description: - name: image_picker_ios - sha256: b9c4a438a9ff4f60808c9cf0039b93a42bb6c2211ef6ebb647394b2b3fa84588 - url: "https://pub.dev" - source: hosted - version: "0.8.13+6" - image_picker_linux: - dependency: transitive - description: - name: image_picker_linux - sha256: "1f81c5f2046b9ab724f85523e4af65be1d47b038160a8c8deed909762c308ed4" - url: "https://pub.dev" - source: hosted - version: "0.2.2" - image_picker_macos: - dependency: transitive - description: - name: image_picker_macos - sha256: "86f0f15a309de7e1a552c12df9ce5b59fe927e71385329355aec4776c6a8ec91" - url: "https://pub.dev" - source: hosted - version: "0.2.2+1" - image_picker_platform_interface: - dependency: transitive - description: - name: image_picker_platform_interface - sha256: "567e056716333a1647c64bb6bd873cff7622233a5c3f694be28a583d4715690c" - url: "https://pub.dev" - source: hosted - version: "2.11.1" - image_picker_windows: - dependency: transitive - description: - name: image_picker_windows - sha256: d248c86554a72b5495a31c56f060cf73a41c7ff541689327b1a7dbccc33adfae - url: "https://pub.dev" - source: hosted - version: "0.2.2" integration_test: dependency: "direct dev" description: flutter @@ -709,14 +568,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.17.0" - mime: - dependency: transitive - description: - name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.dev" - source: hosted - version: "2.0.0" native_toolchain_c: dependency: transitive description: @@ -766,7 +617,7 @@ packages: source: hosted version: "1.1.0" path_provider: - dependency: "direct main" + dependency: transitive description: name: path_provider sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" @@ -813,54 +664,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" - permission_handler: - dependency: "direct main" - description: - name: permission_handler - sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1 - url: "https://pub.dev" - source: hosted - version: "12.0.1" - permission_handler_android: - dependency: transitive - description: - name: permission_handler_android - sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6" - url: "https://pub.dev" - source: hosted - version: "13.0.1" - permission_handler_apple: - dependency: transitive - description: - name: permission_handler_apple - sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023 - url: "https://pub.dev" - source: hosted - version: "9.4.7" - permission_handler_html: - dependency: transitive - description: - name: permission_handler_html - sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" - url: "https://pub.dev" - source: hosted - version: "0.1.3+5" - permission_handler_platform_interface: - dependency: transitive - description: - name: permission_handler_platform_interface - sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 - url: "https://pub.dev" - source: hosted - version: "4.3.0" - permission_handler_windows: - dependency: transitive - description: - name: permission_handler_windows - sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" - url: "https://pub.dev" - source: hosted - version: "0.2.1" petitparser: dependency: transitive description: @@ -894,21 +697,13 @@ packages: source: hosted version: "4.0.0" polkadart: - dependency: "direct main" + dependency: transitive description: name: polkadart sha256: c91901620ba4b0de1f80fe406d509a404f3ed3fde059e7483a1a597ee4ab96da url: "https://pub.dev" source: hosted version: "0.7.3" - polkadart_cli: - dependency: transitive - description: - name: polkadart_cli - sha256: "6a4545652a23aa9ea425d05799101059eb040384dd3d09f3f9b5bb1b7ff7812b" - url: "https://pub.dev" - source: hosted - version: "0.7.2" polkadart_keyring: dependency: transitive description: @@ -972,14 +767,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.3" - recase: - dependency: transitive - description: - name: recase - sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 - url: "https://pub.dev" - source: hosted - version: "4.1.0" record_use: dependency: transitive description: @@ -1097,7 +884,7 @@ packages: source: hosted version: "0.7.1" ss58: - dependency: "direct main" + dependency: transitive description: name: ss58 sha256: ad12bcdc909e73648aba52754b1eab81880bd2cbc4fc6cbaa02695affe49201d @@ -1220,10 +1007,10 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "81da85e9ca8885ade47f9685b953cb098970d11be4821ac765580a6607ea4373" + sha256: "2306c03da2ba81724afeb589c351ebbc0aa7d86005925be8f8735856dbe5e42d" url: "https://pub.dev" source: hosted - version: "1.1.21" + version: "1.2.2" vector_graphics_codec: dependency: transitive description: diff --git a/miner-app/pubspec.yaml b/miner-app/pubspec.yaml index 30a7e00ec..8898ab26b 100644 --- a/miner-app/pubspec.yaml +++ b/miner-app/pubspec.yaml @@ -6,53 +6,38 @@ publish_to: none environment: sdk: ">=3.8.0 <4.0.0" +# Convention: see dependency placement section in ../melos.yaml. +# Shared dep versions must match the canonical list there. dependencies: flutter: sdk: flutter - flutter_localizations: - sdk: flutter - - # Workspace packages (managed by melos.yaml) - quantus_sdk: # Version managed by melos.yaml - - # Hex/byte encoding - convert: - - # Networking and storage - http: # Version managed by melos.yaml - shared_preferences: # Version managed by melos.yaml - polkadart: # For local node RPC queries - ss58: # SS58 address encoding/decoding - - # Mnemonic generation - bip39_mnemonic: # Version managed by melos.yaml - - # Routing - go_router: # Version managed by melos.yaml - - # UI and utilities - flutter_svg: # Version managed by melos.yaml - - # System and file operations - path: # Version managed by melos.yaml - path_provider: # Version managed by melos.yaml - permission_handler: # Version managed by melos.yaml - image_picker: # Version managed by melos.yaml - - # Math and logging - decimal: # Version managed by melos.yaml - logger: # Version managed by melos.yaml + + # quantus_sdk re-exports polkadart, bip39_mnemonic, ss58 etc. + # so miner-app doesn't list them directly. + quantus_sdk: + + # Shared (canonical versions in melos.yaml) + convert: ^3.1.2 + http: ^1.6.0 + shared_preferences: ^2.5.5 + path: ^1.9.1 + flutter_svg: ^2.3.0 flash: ^3.1.1 - lucide_icons_flutter: ^3.1.5 telemetrydecksdk: ^3.0.0 + # Miner-only + go_router: ^17.2.2 + logger: ^2.7.0 + lucide_icons_flutter: ^3.1.13 + dev_dependencies: flutter_test: sdk: flutter - flutter_lints: # Version managed by melos.yaml integration_test: sdk: flutter - flutter_launcher_icons: "^0.14.4" + flutter_lints: ^6.0.0 + flutter_launcher_icons: ^0.14.4 + analyzer: ^10.0.1 flutter: uses-material-design: true @@ -63,4 +48,3 @@ flutter: - assets/tr-ee-u1vxT1-qrcode-white.png - assets/tr-ee-u1vxT1-qrcode-black.svg - assets/tr-ee-u1vxT1-qrcode-white.svg - \ No newline at end of file diff --git a/mobile-app/analysis_options.yaml b/mobile-app/analysis_options.yaml index 206c540d4..1c434ce4e 100644 --- a/mobile-app/analysis_options.yaml +++ b/mobile-app/analysis_options.yaml @@ -1,5 +1,8 @@ include: package:flutter_lints/flutter.yaml +plugins: + riverpod_lint: ^3.1.3 + formatter: page_width: 120 @@ -11,6 +14,7 @@ linter: - prefer_const_constructors - prefer_final_fields - prefer_single_quotes + - use_null_aware_elements analyzer: exclude: diff --git a/mobile-app/lib/app.dart b/mobile-app/lib/app.dart index 08ca8f05b..fb48440ae 100644 --- a/mobile-app/lib/app.dart +++ b/mobile-app/lib/app.dart @@ -33,12 +33,6 @@ class _ResonanceWalletAppState extends ConsumerState { if (Platform.isAndroid) _referralService.checkPlayStoreReferralCode(); } - @override - void dispose() { - ref.read(deepLinkServiceProvider).dispose(); - super.dispose(); - } - @override Widget build(BuildContext context) { return MaterialApp( diff --git a/mobile-app/lib/app_lifecycle_manager.dart b/mobile-app/lib/app_lifecycle_manager.dart index de7db60a4..9180fb6b8 100644 --- a/mobile-app/lib/app_lifecycle_manager.dart +++ b/mobile-app/lib/app_lifecycle_manager.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/connectivity_provider.dart'; import 'package:resonance_network_wallet/providers/remote_config_provider.dart'; diff --git a/mobile-app/lib/providers/account_associations_providers.dart b/mobile-app/lib/providers/account_associations_providers.dart index 40ce3768d..34fb3a574 100644 --- a/mobile-app/lib/providers/account_associations_providers.dart +++ b/mobile-app/lib/providers/account_associations_providers.dart @@ -1,4 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/account_providers.dart'; diff --git a/mobile-app/lib/providers/account_providers.dart b/mobile-app/lib/providers/account_providers.dart index 822d306a6..f2f122c54 100644 --- a/mobile-app/lib/providers/account_providers.dart +++ b/mobile-app/lib/providers/account_providers.dart @@ -1,4 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; diff --git a/mobile-app/lib/providers/all_transactions_provider.dart b/mobile-app/lib/providers/all_transactions_provider.dart index 92e384783..91fa35e9e 100644 --- a/mobile-app/lib/providers/all_transactions_provider.dart +++ b/mobile-app/lib/providers/all_transactions_provider.dart @@ -1,4 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:resonance_network_wallet/models/combined_transactions_list.dart'; import 'package:resonance_network_wallet/models/pagination_state.dart'; import 'package:resonance_network_wallet/providers/controllers/unified_pagination_controller.dart'; diff --git a/mobile-app/lib/providers/controllers/unified_pagination_controller.dart b/mobile-app/lib/providers/controllers/unified_pagination_controller.dart index 358a2020a..48c6e19df 100644 --- a/mobile-app/lib/providers/controllers/unified_pagination_controller.dart +++ b/mobile-app/lib/providers/controllers/unified_pagination_controller.dart @@ -1,4 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/models/pagination_state.dart'; import 'package:resonance_network_wallet/providers/account_id_list_cache.dart'; diff --git a/mobile-app/lib/providers/currency_display_provider.dart b/mobile-app/lib/providers/currency_display_provider.dart index 74b89ae5d..3f1acf56b 100644 --- a/mobile-app/lib/providers/currency_display_provider.dart +++ b/mobile-app/lib/providers/currency_display_provider.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:decimal/decimal.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/models/fiat_currency.dart'; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; diff --git a/mobile-app/lib/providers/filtered_all_transactions_provider.dart b/mobile-app/lib/providers/filtered_all_transactions_provider.dart index b2960fc52..f6e258af9 100644 --- a/mobile-app/lib/providers/filtered_all_transactions_provider.dart +++ b/mobile-app/lib/providers/filtered_all_transactions_provider.dart @@ -1,4 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/models/combined_transactions_list.dart'; import 'package:resonance_network_wallet/models/filtered_transactions_params.dart'; diff --git a/mobile-app/lib/providers/high_security_form_provider.dart b/mobile-app/lib/providers/high_security_form_provider.dart index 851d4ca4f..c7ad0a13e 100644 --- a/mobile-app/lib/providers/high_security_form_provider.dart +++ b/mobile-app/lib/providers/high_security_form_provider.dart @@ -1,4 +1,4 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; class HighSecurityFormNotifier extends StateNotifier { diff --git a/mobile-app/lib/providers/local_auth_provider.dart b/mobile-app/lib/providers/local_auth_provider.dart index ec1ce258d..396f95550 100644 --- a/mobile-app/lib/providers/local_auth_provider.dart +++ b/mobile-app/lib/providers/local_auth_provider.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:resonance_network_wallet/services/local_auth_service.dart'; class LocalAuthState { diff --git a/mobile-app/lib/providers/notification_config_provider.dart b/mobile-app/lib/providers/notification_config_provider.dart index 14a1ec101..f3f63bc59 100644 --- a/mobile-app/lib/providers/notification_config_provider.dart +++ b/mobile-app/lib/providers/notification_config_provider.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:convert'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:resonance_network_wallet/models/notification_models.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/mobile-app/lib/providers/notification_provider.dart b/mobile-app/lib/providers/notification_provider.dart index f02460570..f59fc7741 100644 --- a/mobile-app/lib/providers/notification_provider.dart +++ b/mobile-app/lib/providers/notification_provider.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'package:async/async.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/models/notification_models.dart'; import 'package:resonance_network_wallet/providers/notification_config_provider.dart'; diff --git a/mobile-app/lib/providers/opt_in_position_providers.dart b/mobile-app/lib/providers/opt_in_position_providers.dart index 945677c6c..b0b922d9a 100644 --- a/mobile-app/lib/providers/opt_in_position_providers.dart +++ b/mobile-app/lib/providers/opt_in_position_providers.dart @@ -1,4 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; class OptInPositionNotifier extends StateNotifier> { diff --git a/mobile-app/lib/providers/pending_cancellations_provider.dart b/mobile-app/lib/providers/pending_cancellations_provider.dart index 842b35aa8..0847d366e 100644 --- a/mobile-app/lib/providers/pending_cancellations_provider.dart +++ b/mobile-app/lib/providers/pending_cancellations_provider.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'dart:convert'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:resonance_network_wallet/models/pending_cancellation.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/mobile-app/lib/providers/pending_transactions_provider.dart b/mobile-app/lib/providers/pending_transactions_provider.dart index ae8f2b13f..16b0628e8 100644 --- a/mobile-app/lib/providers/pending_transactions_provider.dart +++ b/mobile-app/lib/providers/pending_transactions_provider.dart @@ -1,4 +1,4 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; // Pending transaction event lifecycle: diff --git a/mobile-app/lib/providers/raider_quest_providers.dart b/mobile-app/lib/providers/raider_quest_providers.dart index 27fceb74b..95b6ce47a 100644 --- a/mobile-app/lib/providers/raider_quest_providers.dart +++ b/mobile-app/lib/providers/raider_quest_providers.dart @@ -1,4 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/account_providers.dart'; diff --git a/mobile-app/lib/providers/remote_config_provider.dart b/mobile-app/lib/providers/remote_config_provider.dart index 93994e4d4..8bb60409c 100644 --- a/mobile-app/lib/providers/remote_config_provider.dart +++ b/mobile-app/lib/providers/remote_config_provider.dart @@ -1,5 +1,6 @@ import 'package:firebase_core/firebase_core.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'dart:async'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/firebase_options.dart'; diff --git a/mobile-app/lib/providers/route_intent_providers.dart b/mobile-app/lib/providers/route_intent_providers.dart index e26222a41..420f91fd1 100644 --- a/mobile-app/lib/providers/route_intent_providers.dart +++ b/mobile-app/lib/providers/route_intent_providers.dart @@ -1,4 +1,4 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; final transactionIntentProvider = StateProvider((_) => null); diff --git a/mobile-app/lib/providers/wallet_providers.dart b/mobile-app/lib/providers/wallet_providers.dart index f04e57b92..e838d0df4 100644 --- a/mobile-app/lib/providers/wallet_providers.dart +++ b/mobile-app/lib/providers/wallet_providers.dart @@ -1,6 +1,7 @@ import 'dart:io' show Platform; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/providers/account_providers.dart'; import 'package:resonance_network_wallet/providers/pending_transactions_provider.dart'; diff --git a/mobile-app/lib/services/deep_link_service.dart b/mobile-app/lib/services/deep_link_service.dart index e25c2c73f..8df00fed9 100644 --- a/mobile-app/lib/services/deep_link_service.dart +++ b/mobile-app/lib/services/deep_link_service.dart @@ -5,7 +5,9 @@ import 'package:resonance_network_wallet/providers/account_associations_provider import 'package:resonance_network_wallet/providers/route_intent_providers.dart'; final deepLinkServiceProvider = Provider((ref) { - return DeepLinkService(ref); + final service = DeepLinkService(ref); + ref.onDispose(service.dispose); + return service; }); class DeepLinkService { diff --git a/mobile-app/lib/services/local_auth_service.dart b/mobile-app/lib/services/local_auth_service.dart index d2c97ba61..8a30d9c43 100644 --- a/mobile-app/lib/services/local_auth_service.dart +++ b/mobile-app/lib/services/local_auth_service.dart @@ -47,7 +47,9 @@ class LocalAuthService { final didAuthenticate = await _localAuth.authenticate( localizedReason: localizedReason, - options: const AuthenticationOptions(biometricOnly: false, stickyAuth: true, sensitiveTransaction: true), + biometricOnly: false, + persistAcrossBackgrounding: true, + sensitiveTransaction: true, ); if (didAuthenticate) cleanLastPausedTime(); diff --git a/mobile-app/lib/services/local_notifications_service.dart b/mobile-app/lib/services/local_notifications_service.dart index cebcb6d61..7c91a8963 100644 --- a/mobile-app/lib/services/local_notifications_service.dart +++ b/mobile-app/lib/services/local_notifications_service.dart @@ -54,7 +54,7 @@ class LocalNotificationsService { const initSettings = InitializationSettings(android: androidSettings, iOS: iosSettings); await _notificationPlugin.initialize( - initSettings, + settings: initSettings, onDidReceiveNotificationResponse: _onDidReceiveNotificationResponse, ); @@ -94,10 +94,10 @@ class LocalNotificationsService { Future _showNotification(NotificationData notification) async { final String? payload = notification.metadata != null ? jsonEncode(notification.metadata) : null; return _notificationPlugin.show( - notification.id.hashCode, - notification.title, - notification.message, - _notificationDetails(), + id: notification.id.hashCode, + title: notification.title, + body: notification.message, + notificationDetails: _notificationDetails(), payload: payload, ); } @@ -116,11 +116,11 @@ class LocalNotificationsService { final String? payload = notification.metadata != null ? jsonEncode(notification.metadata) : null; await _notificationPlugin.zonedSchedule( - notification.id.hashCode, - notification.title, - notification.message, - scheduledDate, - _notificationDetails(), + id: notification.id.hashCode, + title: notification.title, + body: notification.message, + scheduledDate: scheduledDate, + notificationDetails: _notificationDetails(), androidScheduleMode: AndroidScheduleMode.inexactAllowWhileIdle, payload: payload, ); @@ -155,7 +155,7 @@ class LocalNotificationsService { } Future cancelNotification(int id) async { - await _notificationPlugin.cancel(id); + await _notificationPlugin.cancel(id: id); } Future cancelAllNotifications() async { diff --git a/mobile-app/lib/services/telemetry_service.dart b/mobile-app/lib/services/telemetry_service.dart index c68043864..8ddbba223 100644 --- a/mobile-app/lib/services/telemetry_service.dart +++ b/mobile-app/lib/services/telemetry_service.dart @@ -25,6 +25,6 @@ class TelemetryService { /// Tracks that a screen has been viewed. void trackScreenView(String screenName, {Map? parameters}) { - sendEvent('screen_view', parameters: {'screen': screenName, if (parameters != null) ...parameters}); + sendEvent('screen_view', parameters: {'screen': screenName, ...?parameters}); } } diff --git a/mobile-app/lib/shared/utils/tx_filter_family_provider.dart b/mobile-app/lib/shared/utils/tx_filter_family_provider.dart index 00a18a0df..f3bb276a9 100644 --- a/mobile-app/lib/shared/utils/tx_filter_family_provider.dart +++ b/mobile-app/lib/shared/utils/tx_filter_family_provider.dart @@ -1,4 +1,4 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/misc.dart'; import 'package:quantus_sdk/quantus_sdk.dart'; import 'package:resonance_network_wallet/models/filtered_transactions_params.dart'; import 'package:resonance_network_wallet/providers/account_id_list_cache.dart'; diff --git a/mobile-app/lib/v2/screens/send/send_providers.dart b/mobile-app/lib/v2/screens/send/send_providers.dart index 90d7a57e2..1b28e0da7 100644 --- a/mobile-app/lib/v2/screens/send/send_providers.dart +++ b/mobile-app/lib/v2/screens/send/send_providers.dart @@ -1,4 +1,5 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/legacy.dart'; import 'package:quantus_sdk/generated/planck/pallets/balances.dart' as balances; import 'package:resonance_network_wallet/providers/wallet_providers.dart'; diff --git a/mobile-app/pubspec.lock b/mobile-app/pubspec.lock index bbdd006c8..51a985b66 100644 --- a/mobile-app/pubspec.lock +++ b/mobile-app/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: da0d9209ca76bde579f2da330aeb9df62b6319c834fa7baae052021b0462401f + sha256: "5b7468c326d2f8a4f630056404ca0d291ade42918f4a3c6233618e724f39da8e" url: "https://pub.dev" source: hosted - version: "85.0.0" + version: "92.0.0" _flutterfire_internals: dependency: transitive description: name: _flutterfire_internals - sha256: bda3b7b55958bfd867addc40d067b4b11f7b8846d57671f5b5a6e7f9a56fe3ad + sha256: "8f89e371e2883de35cdc78f648e725fa4da5f3b6c927269f00fa68f1ea92b598" url: "https://pub.dev" source: hosted - version: "1.3.69" + version: "1.3.71" adaptive_number: dependency: transitive description: @@ -29,18 +29,18 @@ packages: dependency: transitive description: name: analyzer - sha256: f4ad0fea5f102201015c9aae9d93bc02f75dd9491529a8c21f88d17a8523d44c + sha256: "70e4b1ef8003c64793a9e268a551a82869a8a96f39deb73dea28084b0e8bf75e" url: "https://pub.dev" source: hosted - version: "7.6.0" - analyzer_plugin: + version: "9.0.0" + analyzer_buffer: dependency: transitive description: - name: analyzer_plugin - sha256: a5ab7590c27b779f3d4de67f31c4109dbe13dd7339f86461a6f2a8ab2594d8ce + name: analyzer_buffer + sha256: ff4bd291778c7417fe53fe24ee0d0a1f1ffe281a2d4ea887e7094f16e36eace7 url: "https://pub.dev" source: hosted - version: "0.13.4" + version: "0.3.0" ansicolor: dependency: transitive description: @@ -53,10 +53,10 @@ packages: dependency: "direct main" description: name: app_links - sha256: "5f88447519add627fe1cbcab4fd1da3d4fed15b9baf29f28b22535c95ecee3e8" + sha256: "3462d9defc61565fde4944858b59bec5be2b9d5b05f20aed190adb3ad08a7abc" url: "https://pub.dev" source: hosted - version: "6.4.1" + version: "7.0.0" app_links_linux: dependency: transitive description: @@ -105,14 +105,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.13.1" - base32: - dependency: "direct main" - description: - name: base32 - sha256: "37548444aaee8bd5e91db442ce69ee3a79d3652ed47c1fa7568aa3bb9af0aea5" - url: "https://pub.dev" - source: hosted - version: "2.2.0" base_x: dependency: transitive description: @@ -122,7 +114,7 @@ packages: source: hosted version: "2.0.1" bip39_mnemonic: - dependency: "direct main" + dependency: transitive description: name: bip39_mnemonic sha256: dd6bdfc2547d986b2c00f99bba209c69c0b6fa5c1a185e1f728998282f1249d5 @@ -141,10 +133,10 @@ packages: dependency: transitive description: name: build - sha256: "51dc711996cbf609b90cbe5b335bbce83143875a9d58e4b5c6d3c4f684d3dda7" + sha256: a156715e7cd728130c592f30552575908aae5b100005fbc1f0fb16b3c03a3d10 url: "https://pub.dev" source: hosted - version: "2.5.4" + version: "4.0.6" build_cli_annotations: dependency: transitive description: @@ -157,10 +149,10 @@ packages: dependency: transitive description: name: build_config - sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" + sha256: "4070d2a59f8eec34c97c86ceb44403834899075f66e8a9d59706f8e7834f6f71" url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.3.0" build_daemon: dependency: transitive description: @@ -169,30 +161,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.1" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: ee4257b3f20c0c90e72ed2b57ad637f694ccba48839a821e87db762548c22a62 - url: "https://pub.dev" - source: hosted - version: "2.5.4" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "382a4d649addbfb7ba71a3631df0ec6a45d5ab9b098638144faf27f02778eb53" - url: "https://pub.dev" - source: hosted - version: "2.5.4" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: "85fbbb1036d576d966332a3f5ce83f2ce66a40bea1a94ad2d5fc29a19a0d3792" + sha256: "1523ce62448ebac2c15a8ba5fbad8acac169788658a7dd2a1c2d9c2a9318b9a6" url: "https://pub.dev" source: hosted - version: "9.1.2" + version: "2.15.0" built_collection: dependency: transitive description: @@ -225,14 +201,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.4" - ci: + cli_config: dependency: transitive description: - name: ci - sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13" + name: cli_config + sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec url: "https://pub.dev" source: hosted - version: "0.1.0" + version: "0.2.0" cli_util: dependency: transitive description: @@ -274,7 +250,7 @@ packages: source: hosted version: "1.19.1" connectivity_plus: - dependency: "direct main" + dependency: transitive description: name: connectivity_plus sha256: "62ffa266d9a23b79fb3fcbc206afc00bb979417ba57b1324c546b5aab95ba057" @@ -297,6 +273,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d" + url: "https://pub.dev" + source: hosted + version: "1.15.0" cross_file: dependency: transitive description: @@ -306,7 +290,7 @@ packages: source: hosted version: "0.3.5+2" crypto: - dependency: "direct main" + dependency: transitive description: name: crypto sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf @@ -329,46 +313,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd" - url: "https://pub.dev" - source: hosted - version: "1.0.9" - custom_lint: - dependency: "direct dev" - description: - name: custom_lint - sha256: "9656925637516c5cf0f5da018b33df94025af2088fe09c8ae2ca54c53f2d9a84" - url: "https://pub.dev" - source: hosted - version: "0.7.6" - custom_lint_builder: - dependency: transitive - description: - name: custom_lint_builder - sha256: "6cdc8e87e51baaaba9c43e283ed8d28e59a0c4732279df62f66f7b5984655414" - url: "https://pub.dev" - source: hosted - version: "0.7.6" - custom_lint_core: - dependency: transitive - description: - name: custom_lint_core - sha256: "31110af3dde9d29fb10828ca33f1dce24d2798477b167675543ce3d208dee8be" - url: "https://pub.dev" - source: hosted - version: "0.7.5" - custom_lint_visitor: - dependency: transitive - description: - name: custom_lint_visitor - sha256: "4a86a0d8415a91fbb8298d6ef03e9034dc8e323a599ddc4120a0e36c433983a2" - url: "https://pub.dev" - source: hosted - version: "1.0.0+7.7.0" dart_jsonwebtoken: dependency: transitive description: @@ -381,10 +325,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "8a0e5fba27e8ee025d2ffb4ee820b4e6e2cf5e4246a6b1a477eb66866947e0bb" + sha256: a9c30492da18ff84efe2422ba2d319a89942d93e58eb0b73d32abe822ef54b7b url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.3" dbus: dependency: transitive description: @@ -441,6 +385,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" + ffi_leak_tracker: + dependency: transitive + description: + name: ffi_leak_tracker + sha256: "4093d4ef9ca06ffe2786e73bfb25e22aa92112b9bb4ec941f11e3e6b61489a97" + url: "https://pub.dev" + source: hosted + version: "0.1.2" file: dependency: transitive description: @@ -485,50 +437,50 @@ packages: dependency: "direct main" description: name: firebase_core - sha256: d5a94b884dcb1e6d3430298e94bfe002238094cdfd5e29202d536ee2120f9158 + sha256: "93a5bde9775fd5adcc937f39dfa04ae0bc89c4d79bea6abc49de3f7b049d9ff6" url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "4.9.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: "0ecda14c1bfc9ed8cac303dd0f8d04a320811b479362a9a4efb14fd331a473ce" + sha256: "4a120366dbf7d5a8ee9438978530b664b855728fb8dcc3a201017660817e555b" url: "https://pub.dev" source: hosted - version: "6.0.3" + version: "7.0.1" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: dc5096257cd67292d34d78ceeb90836f02a4be921b5f3934311a02bb2376118c + sha256: "7c98f10b8c8e5adedc0b810b66a877120696675e2c22d9ca9caca092da0d9e57" url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.7.0" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: e5c93e8e7a9b0513f94bb684d2cf100e32e7dcdf2949574386b1955fc9a9b96a + sha256: "8d0dc81a31cd030170508dc3e89bfd14355b20a1b991340af5f018e37daab5d7" url: "https://pub.dev" source: hosted - version: "16.2.0" + version: "16.2.2" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: "8cbb7d842e5071bba836452aff262f7db4b14bb3a0d00c1896cf176df886d65a" + sha256: "37abb0b0535c5497605ee94c12470e1ebbbe47e71a22d0c20bffcc912311f8cb" url: "https://pub.dev" source: hosted - version: "4.7.9" + version: "4.7.11" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: "8750bacf50573c0383535fc3f9c58c6a2f9dff5320a16a82c30631b9dad894f1" + sha256: "54e22b43e2c26a2728a3f68c188de0f9011993ae19ae959a06d476dad935c776" url: "https://pub.dev" source: hosted - version: "4.1.5" + version: "4.1.7" fixnum: dependency: transitive description: @@ -562,12 +514,12 @@ packages: dependency: "direct main" description: name: flutter_dotenv - sha256: b7c7be5cd9f6ef7a78429cabd2774d3c4af50e79cb2b7593e3d5d763ef95c61b + sha256: d41da11fb497314fbf89811ec30af02d1d898b47980a129f0a8c0a1720460ba2 url: "https://pub.dev" source: hosted - version: "5.2.1" + version: "6.0.1" flutter_launcher_icons: - dependency: "direct main" + dependency: "direct dev" description: name: flutter_launcher_icons sha256: "10f13781741a2e3972126fae08393d3c4e01fa4cd7473326b94b72cf594195e7" @@ -586,36 +538,36 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "19ffb0a8bb7407875555e5e98d7343a633bb73707bae6c6a5f37c90014077875" + sha256: "0d9035862236fe38250fe1644d7ed3b8254e34a21b2c837c9f539fbb3bba5ef1" url: "https://pub.dev" source: hosted - version: "19.5.0" + version: "21.0.0" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux - sha256: e3c277b2daab8e36ac5a6820536668d07e83851aeeb79c446e525a70710770a5 + sha256: e0f25e243c6c44c825bbbc6b2b2e76f7d9222362adcfe9fd780bf01923c840bd url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "8.0.0" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface - sha256: "277d25d960c15674ce78ca97f57d0bae2ee401c844b6ac80fcd972a9c99d09fe" + sha256: e7db3d5b49c2b7ecc68deba4aaaa67a348f92ee0fef34c8e4b4459dbef0d7307 url: "https://pub.dev" source: hosted - version: "9.1.0" + version: "11.0.0" flutter_local_notifications_windows: dependency: transitive description: name: flutter_local_notifications_windows - sha256: "8d658f0d367c48bd420e7cf2d26655e2d1130147bca1eea917e576ca76668aaf" + sha256: "3a2654ba104fbb52c618ebed9def24ef270228470718c43b3a6afcd5c81bef0c" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "3.0.0" flutter_native_splash: - dependency: "direct main" + dependency: "direct dev" description: name: flutter_native_splash sha256: "4fb9f4113350d3a80841ce05ebf1976a36de622af7d19aca0ca9a9911c7ff002" @@ -634,10 +586,10 @@ packages: dependency: "direct main" description: name: flutter_riverpod - sha256: "9532ee6db4a943a1ed8383072a2e3eeda041db5657cdf6d2acecf3c21ecbe7e1" + sha256: "4e166be88e1dbbaa34a280bdb744aeae73b7ef25fdf8db7a3bb776760a3648e2" url: "https://pub.dev" source: hosted - version: "2.6.1" + version: "3.3.1" flutter_rust_bridge: dependency: transitive description: @@ -647,7 +599,7 @@ packages: source: hosted version: "2.11.1" flutter_secure_storage: - dependency: "direct main" + dependency: transitive description: name: flutter_secure_storage sha256: "6848263f9744072d0977347c383fb8b57d9780319a6bf5238b5a2866a029de62" @@ -690,18 +642,18 @@ packages: dependency: transitive description: name: flutter_secure_storage_windows - sha256: "3b7c8e068875dfd46719ff57c90d8c459c87f2302ed6b00ff006b3c9fcad1613" + sha256: "8f42f359f187a94dce7a3ab2ec5903d013dddfc7127078ebab19fa244c3840e8" url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.2.1" flutter_svg: dependency: "direct main" description: name: flutter_svg - sha256: "1ded017b39c8e15c8948ea855070a5ff8ff8b3d5e83f3446e02d6bb12add7ad9" + sha256: "35882981abcbfb8c15b286f0cd690ff25bac12d95eff3e25ee207f37d4c42e7f" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.3.0" flutter_test: dependency: "direct dev" description: flutter @@ -784,14 +736,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.2" - hex: - dependency: "direct main" - description: - name: hex - sha256: "4e7cd54e4b59ba026432a6be2dd9d96e4c5205725194997193bf871703b82c4a" - url: "https://pub.dev" - source: hosted - version: "0.2.0" hooks: dependency: transitive description: @@ -800,14 +744,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.3" - hotreloader: - dependency: transitive - description: - name: hotreloader - sha256: "66871df468fc24eee81f1a0a7cb98acc104716f9b7376d355437b48d633c4ebf" - url: "https://pub.dev" - source: hosted - version: "4.4.0" html: dependency: transitive description: @@ -841,7 +777,7 @@ packages: source: hosted version: "4.1.2" human_checksum: - dependency: "direct main" + dependency: transitive description: path: dart ref: "v2.2.0" @@ -861,10 +797,10 @@ packages: dependency: "direct main" description: name: image_picker - sha256: "784210112be18ea55f69d7076e2c656a4e24949fa9e76429fe53af0c0f4fa320" + sha256: "91c025426c2881c551100bce834e201c835a170151545f58d17da5180ca7d9ac" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" image_picker_android: dependency: transitive description: @@ -922,7 +858,7 @@ packages: source: hosted version: "0.2.2" intl: - dependency: "direct main" + dependency: transitive description: name: intl sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" @@ -953,14 +889,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" json_annotation: dependency: transitive description: @@ -1021,26 +949,26 @@ packages: dependency: "direct main" description: name: local_auth - sha256: "434d854cf478f17f12ab29a76a02b3067f86a63a6d6c4eb8fbfdcfe4879c1b7b" + sha256: ae6f382f638108c6becd134318d7c3f0a93875383a54010f61d7c97ac05d5137 url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "3.0.1" local_auth_android: dependency: transitive description: name: local_auth_android - sha256: a0bdfcc0607050a26ef5b31d6b4b254581c3d3ce3c1816ab4d4f4a9173e84467 + sha256: b201c006fa769c23386f89aa6837ec0eb8179fcfb212eadcf87b422b3f9a6a78 url: "https://pub.dev" source: hosted - version: "1.0.56" + version: "2.0.8" local_auth_darwin: dependency: transitive description: name: local_auth_darwin - sha256: "699873970067a40ef2f2c09b4c72eb1cfef64224ef041b3df9fdc5c4c1f91f49" + sha256: a8c3d4e17454111f7fd31ff72a31222359f6059f7fe956c2dcfe0f88f49826d4 url: "https://pub.dev" source: hosted - version: "1.6.1" + version: "2.0.3" local_auth_platform_interface: dependency: transitive description: @@ -1053,10 +981,10 @@ packages: dependency: transitive description: name: local_auth_windows - sha256: bc4e66a29b0fdf751aafbec923b5bed7ad6ed3614875d8151afe2578520b2ab5 + sha256: be12c5b8ba5e64896983123655c5f67d2484ecfcc95e367952ad6e3bff94cb16 url: "https://pub.dev" source: hosted - version: "1.0.11" + version: "2.0.1" logging: dependency: transitive description: @@ -1117,10 +1045,10 @@ packages: dependency: "direct dev" description: name: mockito - sha256: "4546eac99e8967ea91bae633d2ca7698181d008e95fa4627330cf903d573277a" + sha256: eff30d002f0c8bf073b6f929df4483b543133fcafce056870163587b03f1d422 url: "https://pub.dev" source: hosted - version: "5.4.6" + version: "5.6.4" native_toolchain_c: dependency: transitive description: @@ -1129,14 +1057,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.17.6" - nested: - dependency: transitive - description: - name: nested - sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.dev" - source: hosted - version: "1.0.0" nm: dependency: transitive description: @@ -1145,6 +1065,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" objective_c: dependency: transitive description: @@ -1266,21 +1194,13 @@ packages: source: hosted version: "4.0.0" polkadart: - dependency: "direct main" + dependency: transitive description: name: polkadart sha256: c91901620ba4b0de1f80fe406d509a404f3ed3fde059e7483a1a597ee4ab96da url: "https://pub.dev" source: hosted version: "0.7.3" - polkadart_cli: - dependency: transitive - description: - name: polkadart_cli - sha256: "3c2371134031c518b7728e24fd1b5dbcce98a364c97dd5a89518cccfc7222712" - url: "https://pub.dev" - source: hosted - version: "0.7.1" polkadart_keyring: dependency: transitive description: @@ -1321,14 +1241,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.7.0" - provider: - dependency: "direct main" - description: - name: provider - sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" - url: "https://pub.dev" - source: hosted - version: "6.1.5+1" pub_semver: dependency: transitive description: @@ -1369,7 +1281,7 @@ packages: source: path version: "0.1.0" quiver: - dependency: "direct main" + dependency: transitive description: name: quiver sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 @@ -1392,14 +1304,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.7.3" - recase: - dependency: transitive - description: - name: recase - sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 - url: "https://pub.dev" - source: hosted - version: "4.1.0" record_use: dependency: transitive description: @@ -1436,42 +1340,34 @@ packages: dependency: transitive description: name: riverpod - sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959" + sha256: "8c22216be8ad3ef2b44af3a329693558c98eca7b8bd4ef495c92db0bba279f83" url: "https://pub.dev" source: hosted - version: "2.6.1" + version: "3.2.1" riverpod_analyzer_utils: dependency: transitive description: name: riverpod_analyzer_utils - sha256: "03a17170088c63aab6c54c44456f5ab78876a1ddb6032ffde1662ddab4959611" + sha256: e55bc08c084a424e1bbdc303fe8ea75daafe4269b68fd0e0f6f1678413715b66 url: "https://pub.dev" source: hosted - version: "0.5.10" + version: "1.0.0-dev.9" riverpod_annotation: dependency: "direct main" description: name: riverpod_annotation - sha256: e14b0bf45b71326654e2705d462f21b958f987087be850afd60578fcd502d1b8 + sha256: "16471a1260b94e939394d78f1c63a9350936ac4a68c9fbdab40be47268c0b04f" url: "https://pub.dev" source: hosted - version: "2.6.1" + version: "4.0.2" riverpod_generator: dependency: "direct dev" description: name: riverpod_generator - sha256: "44a0992d54473eb199ede00e2260bd3c262a86560e3c6f6374503d86d0580e36" - url: "https://pub.dev" - source: hosted - version: "2.6.5" - riverpod_lint: - dependency: "direct dev" - description: - name: riverpod_lint - sha256: "89a52b7334210dbff8605c3edf26cfe69b15062beed5cbfeff2c3812c33c9e35" + sha256: "6f9220534d7a353b53c875ea191a84d28cb4e52ac420a66a1bd7318329d977b0" url: "https://pub.dev" source: hosted - version: "2.6.5" + version: "4.0.3" rust_lib_resonance_network_wallet: dependency: transitive description: @@ -1499,18 +1395,18 @@ packages: dependency: "direct main" description: name: share_plus - sha256: "223873d106614442ea6f20db5a038685cc5b32a2fba81cdecaefbbae0523f7fa" + sha256: a857d8b1479250aff6b57a51b2c02d31ca05848d441817c43f1640c885c286c0 url: "https://pub.dev" source: hosted - version: "12.0.2" + version: "13.1.0" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - sha256: "88023e53a13429bd65d8e85e11a9b484f49d4c190abbd96c7932b74d6927cc9a" + sha256: "7f7ae28cf400d13f811e297ff37742dba83b79e0a6f5dce14eec0248274e6ce9" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "7.1.0" shared_preferences: dependency: "direct main" description: @@ -1575,6 +1471,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.2" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" shelf_web_socket: dependency: transitive description: @@ -1592,10 +1504,26 @@ packages: dependency: transitive description: name: source_gen - sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" + sha256: ec37cc0e6694374cbef59ed79685572c870a54ede6fa30a3e420feb3adffea02 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "4.2.3" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" + url: "https://pub.dev" + source: hosted + version: "0.10.13" source_span: dependency: transitive description: @@ -1613,7 +1541,7 @@ packages: source: hosted version: "0.7.1" ss58: - dependency: "direct main" + dependency: transitive description: name: ss58 sha256: ad12bcdc909e73648aba52754b1eab81880bd2cbc4fc6cbaa02695affe49201d @@ -1724,6 +1652,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.2" + test: + dependency: transitive + description: + name: test + sha256: "280d6d890011ca966ad08df7e8a4ddfab0fb3aa49f96ed6de56e3521347a9ae7" + url: "https://pub.dev" + source: hosted + version: "1.30.0" test_api: dependency: transitive description: @@ -1732,22 +1668,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.10" - timezone: - dependency: "direct main" + test_core: + dependency: transitive description: - name: timezone - sha256: dd14a3b83cfd7cb19e7888f1cbc20f258b8d71b54c06f79ac585f14093a287d1 + name: test_core + sha256: "0381bd1585d1a924763c308100f2138205252fb90c9d4eeaf28489ee65ccde51" url: "https://pub.dev" source: hosted - version: "0.10.1" - timing: - dependency: transitive + version: "0.6.16" + timezone: + dependency: "direct main" description: - name: timing - sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" + name: timezone + sha256: "784a5e34d2eb62e1326f24d6f600aaaee452eb8ca8ef2f384a59244e292d158b" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "0.11.0" typed_data: dependency: transitive description: @@ -1864,10 +1800,10 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "81da85e9ca8885ade47f9685b953cb098970d11be4821ac765580a6607ea4373" + sha256: "2306c03da2ba81724afeb589c351ebbc0aa7d86005925be8f8735856dbe5e42d" url: "https://pub.dev" source: hosted - version: "1.1.21" + version: "1.2.2" vector_graphics_codec: dependency: transitive description: @@ -1892,46 +1828,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" - video_player: - dependency: "direct main" - description: - name: video_player - sha256: "48a7bdaa38a3d50ec10c78627abdbfad863fdf6f0d6e08c7c3c040cfd80ae36f" - url: "https://pub.dev" - source: hosted - version: "2.11.1" - video_player_android: - dependency: transitive - description: - name: video_player_android - sha256: "877a6c7ba772456077d7bfd71314629b3fe2b73733ce503fc77c3314d43a0ca0" - url: "https://pub.dev" - source: hosted - version: "2.9.5" - video_player_avfoundation: - dependency: transitive - description: - name: video_player_avfoundation - sha256: af0e5b8a7a4876fb37e7cc8cb2a011e82bb3ecfa45844ef672e32cb14a1f259e - url: "https://pub.dev" - source: hosted - version: "2.9.4" - video_player_platform_interface: - dependency: transitive - description: - name: video_player_platform_interface - sha256: "57c5d73173f76d801129d0531c2774052c5a7c11ccb962f1830630decd9f24ec" - url: "https://pub.dev" - source: hosted - version: "6.6.0" - video_player_web: - dependency: transitive - description: - name: video_player_web - sha256: "9f3c00be2ef9b76a95d94ac5119fb843dca6f2c69e6c9968f6f2b6c9e7afbdeb" - url: "https://pub.dev" - source: hosted - version: "2.4.0" vm_service: dependency: transitive description: @@ -1980,14 +1876,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.2.1" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" win32: dependency: transitive description: name: win32 - sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e + sha256: a1fc9eb9248baa05dfc12ed5b66e377b3e23f095eec078e0371622b9033810d9 url: "https://pub.dev" source: hosted - version: "5.15.0" + version: "6.2.0" xdg_directories: dependency: transitive description: diff --git a/mobile-app/pubspec.yaml b/mobile-app/pubspec.yaml index 7dfa7e676..03873f20a 100644 --- a/mobile-app/pubspec.yaml +++ b/mobile-app/pubspec.yaml @@ -7,69 +7,63 @@ version: 1.5.0+104 environment: sdk: ">=3.8.0 <4.0.0" +# Convention: see dependency placement section in ../melos.yaml. +# Shared dep versions must match the canonical list there. dependencies: flutter: sdk: flutter - url_launcher: ^6.2.1 + quantus_sdk: - video_player: - qr_flutter: - flutter_svg: - mobile_scanner: - flutter_native_splash: - cupertino_icons: - flash: - flutter_launcher_icons: - local_auth: ^2.1.6 - - decimal: - hex: - base32: ^2.0.0 - ss58: - bip39_mnemonic: - intl: - quiver: - convert: - crypto: - - shared_preferences: - flutter_secure_storage: ^10.1.0 - http: - - human_checksum: - git: - url: https://github.com/Quantus-Network/qp-human-checkphrase.git - ref: v2.2.0 - path: dart - provider: ^6.1.5 - polkadart: ^0.7.1 - share_plus: ^12.0.1 - flutter_riverpod: ^2.6.1 - riverpod_annotation: ^2.6.1 + + # Shared (canonical versions in melos.yaml) + convert: ^3.1.2 + http: ^1.6.0 + shared_preferences: ^2.5.5 + decimal: ^3.2.4 + flutter_svg: ^2.3.0 + flash: ^3.1.1 + collection: ^1.19.1 telemetrydecksdk: ^3.0.0 - async: ^2.13.0 - app_links: ^6.4.1 - flutter_dotenv: ^5.1.0 - supabase_flutter: ^2.5.2 + + # State management + flutter_riverpod: ^3.3.1 + riverpod_annotation: ^4.0.2 + + # UI + qr_flutter: ^4.1.0 + mobile_scanner: ^7.2.0 + image_picker: ^1.2.2 + + # Auth, sharing, links + url_launcher: ^6.3.2 + local_auth: ^3.0.1 + share_plus: ^13.1.0 + app_links: ^7.0.0 + + # Config + backend + flutter_dotenv: ^6.0.1 + supabase_flutter: ^2.12.4 play_install_referrer: ^0.5.0 - connectivity_plus: ^7.0.0 - flutter_local_notifications: ^19.5.0 - timezone: ^0.10.1 + + # Notifications + flutter_local_notifications: ^21.0.0 + timezone: ^0.11.0 flutter_timezone: ^5.0.1 - collection: ^1.19.1 - firebase_core: ^4.4.0 - firebase_messaging: ^16.1.1 - image_picker: ^1.2.1 + firebase_core: ^4.9.0 + firebase_messaging: ^16.2.2 + + # Utility + async: ^2.13.1 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: - riverpod_generator: ^2.6.5 + flutter_lints: ^6.0.0 build_runner: ^2.5.4 - mockito: ^5.4.6 - custom_lint: ^0.7.6 - riverpod_lint: ^2.6.5 + riverpod_generator: ^4.0.3 + mockito: ^5.6.4 + flutter_launcher_icons: ^0.14.4 + flutter_native_splash: ^2.4.7 flutter: uses-material-design: true diff --git a/mobile-app/test/extensions.dart b/mobile-app/test/extensions.dart index 5e270294b..fe33c7265 100644 --- a/mobile-app/test/extensions.dart +++ b/mobile-app/test/extensions.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_riverpod/misc.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:resonance_network_wallet/features/styles/app_theme.dart'; diff --git a/quantus_sdk/analysis_options.yaml b/quantus_sdk/analysis_options.yaml index 4ed2bc4ae..25376b0db 100644 --- a/quantus_sdk/analysis_options.yaml +++ b/quantus_sdk/analysis_options.yaml @@ -1,5 +1,8 @@ include: package:flutter_lints/flutter.yaml +formatter: + page_width: 120 + linter: rules: - always_declare_return_types @@ -8,6 +11,7 @@ linter: - prefer_const_constructors - prefer_final_fields - prefer_single_quotes + - use_null_aware_elements analyzer: exclude: diff --git a/quantus_sdk/lib/quantus_sdk.dart b/quantus_sdk/lib/quantus_sdk.dart index 2ffd2b988..212f0d196 100644 --- a/quantus_sdk/lib/quantus_sdk.dart +++ b/quantus_sdk/lib/quantus_sdk.dart @@ -73,6 +73,11 @@ export 'src/quantus_payload_parser.dart'; export 'src/models/entrusted_account.dart'; export 'src/models/display_account.dart'; +// Blockchain-infrastructure third-party re-exports. Apps consume these via +// the SDK rather than depending on polkadart / bip39_mnemonic directly. +export 'package:bip39_mnemonic/bip39_mnemonic.dart' show Mnemonic, Language; +export 'package:polkadart/scale_codec.dart' show ByteOutput, CompactCodec; + class QuantusSdk { /// Initialise the SDK (loads Rust FFI, etc). static Future init() async { diff --git a/quantus_sdk/lib/src/services/substrate_service.dart b/quantus_sdk/lib/src/services/substrate_service.dart index e76b56552..941e12734 100644 --- a/quantus_sdk/lib/src/services/substrate_service.dart +++ b/quantus_sdk/lib/src/services/substrate_service.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'dart:math'; -import 'package:bip39_mnemonic/bip39_mnemonic.dart'; import 'package:convert/convert.dart'; import 'package:flutter/foundation.dart'; import 'package:polkadart/polkadart.dart'; diff --git a/quantus_sdk/pubspec.lock b/quantus_sdk/pubspec.lock index 33b67cc86..7a95d46ad 100644 --- a/quantus_sdk/pubspec.lock +++ b/quantus_sdk/pubspec.lock @@ -162,7 +162,7 @@ packages: source: hosted version: "0.3.5+2" crypto: - dependency: "direct main" + dependency: transitive description: name: crypto sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf @@ -649,7 +649,7 @@ packages: source: hosted version: "0.7.3" polkadart_cli: - dependency: "direct main" + dependency: "direct dev" description: name: polkadart_cli sha256: "6a4545652a23aa9ea425d05799101059eb040384dd3d09f3f9b5bb1b7ff7812b" @@ -657,7 +657,7 @@ packages: source: hosted version: "0.7.2" polkadart_keyring: - dependency: "direct main" + dependency: transitive description: name: polkadart_keyring sha256: cb1b9733bfbd603d73410ca68e808b0921e24291cdc02ade18907980c5c6872c @@ -689,7 +689,7 @@ packages: source: hosted version: "2.2.0" quiver: - dependency: "direct main" + dependency: transitive description: name: quiver sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 diff --git a/quantus_sdk/pubspec.yaml b/quantus_sdk/pubspec.yaml index 4c8fbd483..685e90180 100644 --- a/quantus_sdk/pubspec.yaml +++ b/quantus_sdk/pubspec.yaml @@ -6,61 +6,53 @@ publish_to: none environment: sdk: ">=3.8.0 <4.0.0" +# Convention: see dependency placement section in ../melos.yaml. +# Shared dep versions must match the canonical list there. dependencies: flutter: sdk: flutter - - # Rust bridge and local dependencies - flutter_rust_bridge: 2.11.1 + rust_lib_resonance_network_wallet: path: ./rust_builder - - # Polkadart ecosystem (managed by melos.yaml) - polkadart: ^0.7.1 - polkadart_keyring: ^0.7.0 - polkadart_cli: ^0.7.1 + flutter_rust_bridge: ^2.11.1 + + # Shared (canonical versions in melos.yaml) + # DO NOT UPDATE polkadart - newer versions are incompatible with our ML-DSA + # signature override, work completely differently, and add no benefits. + # Re-exported from quantus_sdk.dart so apps don't need a direct polkadart dep. + polkadart: ^0.7.3 + bip39_mnemonic: ^4.0.1 + convert: ^3.1.2 + http: ^1.6.0 + shared_preferences: ^2.5.5 + decimal: ^3.2.4 + path: ^1.9.1 + flash: ^3.1.1 + collection: ^1.19.1 - # Crypto and encoding - bip39_mnemonic: # Version managed by melos.yaml - crypto: # Version managed by melos.yaml - ss58: # Version managed by melos.yaml - convert: # Version managed by melos.yaml - - # Storage, networking, and utilities - shared_preferences: # Version managed by melos.yaml + # SDK-only + ss58: ^1.3.1 + intl: ^0.20.2 flutter_secure_storage: ^10.1.0 - http: # Version managed by melos.yaml - decimal: # Version managed by melos.yaml - quiver: # Version managed by melos.yaml - intl: # Version managed by melos.yaml - connectivity_plus: # Version managed by melos.yaml - - # UI feedback - flash: # Version managed by melos.yaml + connectivity_plus: ^7.1.1 + path_provider: ^2.1.5 - # Filesystem helpers (used by circuit + wormhole address persistence) - path: # Version managed by melos.yaml - path_provider: # Version managed by melos.yaml - - # Git dependencies (can't be managed by melos dependency_overrides) human_checksum: git: url: https://github.com/Quantus-Network/qp-human-checkphrase.git ref: v2.2.0 path: dart -# Generate Polkadart bindings -# dart pub run polkadart_cli:generate -v - - collection: any -polkadart: - output_dir: lib/generated # Optional. Sets the directory of generated files. Provided value should be a valid path on your system. Default: lib/generated - chains: # Dictionary of chains and endpoints - planck: wss://a1-planck.quantus.cat - dev_dependencies: flutter_test: sdk: flutter - flutter_lints: # Version managed by melos.yaml integration_test: sdk: flutter + flutter_lints: ^6.0.0 + # DO NOT UPDATE polkadart_cli - must match polkadart 0.7.x. See note above. + polkadart_cli: ^0.7.1 + +polkadart: + output_dir: lib/generated + chains: + planck: wss://a1-planck.quantus.cat