diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb8afcfe6..57950c5b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true @@ -78,7 +78,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true @@ -113,7 +113,7 @@ jobs: MacOs: environment: Macos - runs-on: macos-15 + runs-on: macos-15-intel steps: - name: Checkout Repo uses: actions/checkout@v4 @@ -125,7 +125,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true @@ -227,7 +227,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true @@ -301,7 +301,7 @@ jobs: path: ./myWitWallet.apk IOS: - runs-on: macos-15 + runs-on: macos-15-intel environment: IOS steps: - name: Checkout Repo @@ -314,7 +314,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index b2aab38db..3712a3cca 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -17,7 +17,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true @@ -91,7 +91,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true @@ -124,7 +124,7 @@ jobs: run: ldd build/linux/x64/release/bundle/myWitWallet MacOs: - runs-on: macos-15 + runs-on: macos-15-intel steps: - name: Clone uses: actions/checkout@v4 @@ -136,7 +136,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true @@ -165,7 +165,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true @@ -202,7 +202,7 @@ jobs: subdirectory: 'android' IOS: - runs-on: macos-15 + runs-on: macos-15-intel steps: - name: Clone uses: actions/checkout@v4 @@ -214,7 +214,7 @@ jobs: uses: subosito/flutter-action@v2 with: architecture: x64 - flutter-version: '3.32.0' + flutter-version: '3.38.3' channel: 'stable' cache: true diff --git a/.gitignore b/.gitignore index 1b3564679..11296536a 100644 --- a/.gitignore +++ b/.gitignore @@ -32,9 +32,9 @@ /build/ # Web related lib/generated_plugin_registrant.dart -lib/I18n/app_localizations.dart -lib/I18n/app_localizations_es.dart -lib/I18n/app_localizations_en.dart +lib/l10n/app_localizations.dart +lib/l10n/app_localizations_es.dart +lib/l10n/app_localizations_en.dart # Symbolication related app.*.symbols diff --git a/android/app/build.gradle b/android/app/build.gradle index aeae304e8..3705e28d0 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,9 +1,29 @@ plugins { id "com.android.application" - id "kotlin-android" + id "org.jetbrains.kotlin.android" id "dev.flutter.flutter-gradle-plugin" } - +// Force older AndroidX core libs so they work with AGP 8.6.x +configurations.all { + resolutionStrategy.eachDependency { details -> + if (details.requested.group == "androidx.core" + && (details.requested.name == "core" || details.requested.name == "core-ktx")) { + // 1.13.1 is pre 1.15/1.17 AAR-metadata strictness + details.useVersion "1.13.1" + details.because("Flutter 3.38 uses AGP 8.6.x, so we avoid androidx.core 1.17.0 which requires AGP 8.9.1") + } + if (details.requested.group == "androidx.browser" + && details.requested.name == "browser") { + details.useVersion "1.8.0" + details.because("Avoid androidx.browser 1.9.0 which requires AGP 8.9.1 while Flutter pins 8.6.x") + } + if (details.requested.group == "net.bytebuddy" + && details.requested.name == "byte-buddy") { + details.useVersion "1.14.10" + details.because("Avoid byte-buddy 1.17.6 which Jetifier cannot transform (unsupported class file major version 68)") + } + } +} def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -34,10 +54,10 @@ def keystoreProperties = new Properties() } android { - compileSdkVersion 35 + compileSdkVersion 36 namespace "io.witnet.myWitWallet" testNamespace "io.witnet.myWitWalletTest" - ndkVersion = "26.3.11579264" + ndkVersion = "29.0.14206865" sourceSets { main.java.srcDirs += 'src/main/kotlin' } @@ -51,8 +71,8 @@ android { defaultConfig { applicationId "io.witnet.myWitWallet" - minSdk 21 - targetSdk 34 + minSdkVersion flutter.minSdkVersion + targetSdk 36 multiDexEnabled true versionCode flutterVersionCode.toInteger() versionName flutterVersionName @@ -79,5 +99,5 @@ flutter { } dependencies { - implementation "com.android.support:multidex:1.0.3" + implementation "androidx.multidex:multidex:2.0.1" } \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index f00dc3ba4..869176a4c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -15,6 +15,11 @@ subprojects { } } } + if (project.name == "url_launcher_android") { + project.tasks.withType(Test).configureEach { + enabled = false + } + } } project.buildDir = "${rootProject.buildDir}/${project.name}" project.evaluationDependsOn(':app') diff --git a/android/gradle.properties b/android/gradle.properties index affc91602..ec746cc6c 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -3,5 +3,5 @@ org.gradle.parallel=true org.gradle.caching=true org.gradle.daemon=true android.useAndroidX=true -android.enableJetifier=true +android.enableJetifier=false android.useDeprecatedNdk=true \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 3c85cfe05..efdcc4ace 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index e80ba4dc0..600b2919c 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,9 +18,9 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "org.jetbrains.kotlin.android" version "1.9.0" apply false - id 'com.android.application' version '8.6.0' apply false - id 'com.android.library' version '8.6.0' apply false + id "org.jetbrains.kotlin.android" version "2.1.0" apply false + id 'com.android.application' version '8.9.1' apply false + id 'com.android.library' version '8.9.1' apply false } include ':app' \ No newline at end of file diff --git a/ios/Podfile b/ios/Podfile index d36385baf..c24c739a5 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -45,7 +45,7 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference xcconfig_path = config.base_configuration_reference.real_path IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR")) diff --git a/lib/screens/login/bloc/login_bloc.dart b/lib/screens/login/bloc/login_bloc.dart index 2e2ccdcfb..7ba38bf3f 100644 --- a/lib/screens/login/bloc/login_bloc.dart +++ b/lib/screens/login/bloc/login_bloc.dart @@ -45,10 +45,8 @@ class LoginBloc extends Bloc { bool authenticated = await auth.authenticate( localizedReason: 'Scan your fingerprint (or face or whatever) to authenticate', - options: const AuthenticationOptions( - stickyAuth: true, - biometricOnly: true, - ), + persistAcrossBackgrounding: true, + biometricOnly: true, ); if (authenticated) { status = BiometricsStatus.autenticated; diff --git a/lib/shared/api_database.dart b/lib/shared/api_database.dart index 4a881a7c5..257085aba 100644 --- a/lib/shared/api_database.dart +++ b/lib/shared/api_database.dart @@ -5,7 +5,7 @@ import 'package:my_wit_wallet/util/preferences.dart'; import 'package:my_wit_wallet/util/storage/database/stats.dart'; import 'package:my_wit_wallet/util/storage/log.dart'; import 'package:witnet/explorer.dart'; -import 'package:my_wit_wallet/util/storage/database/database_isolate.dart'; +import 'package:my_wit_wallet/util/storage/database/database_manager.dart'; import 'package:my_wit_wallet/util/storage/database/database_service.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:my_wit_wallet/util/storage/path_provider_interface.dart'; @@ -34,23 +34,22 @@ class ApiDatabase { late WalletStorage walletStorage; bool walletsLoaded = false; - DatabaseIsolate get databaseIsolate => Locator.instance(); + DatabaseManager get databaseManager => Locator.instance(); DebugLogger get logger => Locator.instance(); ApiExplorer get explorer => Locator.instance(); PathProviderInterface interface = PathProviderInterface(); - Future _processIsolate( + Future _processDbRequest( {required String method, Map? params}) async { - if (!databaseIsolate.initialized && !databaseIsolate.loading) { - await databaseIsolate.init(); + if (!databaseManager.initialized && !databaseManager.loading) { + await databaseManager.init(); } else { do { await Future.delayed(Duration(milliseconds: 1)); - } while (databaseIsolate.loading); + } while (databaseManager.loading); } - final ReceivePort response = ReceivePort(); - databaseIsolate.send( + databaseManager.send( method: method, params: params ?? {}, port: response.sendPort); return await response.first.then((value) { if (value.runtimeType == DBException) { @@ -63,7 +62,7 @@ class ApiDatabase { Future masterKeySet() async { try { - var value = await _processIsolate( + var value = await _processDbRequest( method: 'masterKeySet', params: {}, ); @@ -169,7 +168,7 @@ class ApiDatabase { Future verifyPassword(String password) async { try { - bool isValidPasssword = await await _processIsolate( + bool isValidPasssword = await await _processDbRequest( method: 'verifyPassword', params: {'password': password}, ); @@ -198,7 +197,7 @@ class ApiDatabase { Future getKeychain() async { try { if (unlocked) { - var value = await _processIsolate( + var value = await _processDbRequest( method: 'getKeychain', params: {}, ); @@ -214,7 +213,7 @@ class ApiDatabase { Future setPassword( {String? oldPassword, required String newPassword}) async { - await _processIsolate( + await _processDbRequest( method: 'setPassword', params: { 'oldPassword': oldPassword ?? '', @@ -235,7 +234,7 @@ class ApiDatabase { print('Error getting api version $err'); } try { - var response = await _processIsolate( + var response = await _processDbRequest( method: 'configure', params: { 'path': interface.getDbWalletsPath(), @@ -252,7 +251,7 @@ class ApiDatabase { Future lockDatabase() async { try { - var response = await _processIsolate( + var response = await _processDbRequest( method: 'lock', params: {}, ); @@ -263,75 +262,76 @@ class ApiDatabase { } Future addStats(AccountStats accountStats) async { - return await _processIsolate( + return await _processDbRequest( method: 'add', params: {'type': 'stats', 'value': accountStats.jsonMap()}); } Future deleteStats(AccountStats accountStats) async { - return await _processIsolate( + return await _processDbRequest( method: 'delete', params: {'type': 'stats', 'value': accountStats.jsonMap()}); } Future updateStats(AccountStats accountStats) async { - return await _processIsolate( + return await _processDbRequest( method: 'update', params: {'type': 'stats', 'value': accountStats.jsonMap()}); } Future getStatsByAddress(String address) async { - return await _processIsolate( + return await _processDbRequest( method: 'getStatsByAddress', params: {'address': address}); } Future addWallet(Wallet wallet) async { _wallets[wallet.name] = wallet; - return await _processIsolate( + return await _processDbRequest( method: 'add', params: {'type': 'wallet', 'value': wallet.jsonMap()}); } Future deleteWallet(Wallet wallet) async { - return await _processIsolate( + return await _processDbRequest( method: 'delete', params: {'type': 'wallet', 'value': wallet.jsonMap()}); } Future deleteAllWallets() async { - return await _processIsolate(method: 'deleteDatabase'); + return await _processDbRequest(method: 'deleteDatabase'); } Future addAccount(Account account) async { - return await _processIsolate( + return await _processDbRequest( method: 'add', params: {'type': 'account', 'value': account.jsonMap()}); } Future addVtt(ValueTransferInfo transaction) async { - return await _processIsolate( + return await _processDbRequest( method: 'add', params: {'type': 'vtt', 'value': transaction.jsonMap()}); } Future addStake(StakeEntry transaction) async { - return await _processIsolate( + return await _processDbRequest( method: 'add', params: {'type': 'stake', 'value': transaction.jsonMap()}); } Future addUnstake(UnstakeEntry transaction) async { - return await _processIsolate( + return await _processDbRequest( method: 'add', params: {'type': 'unstake', 'value': transaction.jsonMap()}); } Future addMint(MintEntry transaction) async { - return await _processIsolate( + return await _processDbRequest( method: 'add', params: {'type': 'mint', 'value': transaction.jsonMap()}); } Future getStake(String hash) async { try { - return await _processIsolate(method: 'getStake', params: {"hash": hash}); + return await _processDbRequest( + method: 'getStake', params: {"hash": hash}); } catch (err) { print('Error getting vtt:: $err'); return null; @@ -340,7 +340,8 @@ class ApiDatabase { Future getUnstake(String hash) async { try { - return await _processIsolate(method: 'getStake', params: {"hash": hash}); + return await _processDbRequest( + method: 'getStake', params: {"hash": hash}); } catch (err) { print('Error getting vtt:: $err'); return null; @@ -349,7 +350,7 @@ class ApiDatabase { Future getVtt(String hash) async { try { - return await _processIsolate(method: 'getVtt', params: {"hash": hash}); + return await _processDbRequest(method: 'getVtt', params: {"hash": hash}); } catch (err) { print('Error getting vtt:: $err'); return null; @@ -358,7 +359,7 @@ class ApiDatabase { Future getAccount(String hash) async { try { - return await _processIsolate( + return await _processDbRequest( method: 'getAccount', params: {"hash": hash}); } catch (err) { print('Error getting account info:: $err'); @@ -368,7 +369,7 @@ class ApiDatabase { Future getMint(String hash) async { try { - return await _processIsolate(method: 'getMint', params: {"hash": hash}); + return await _processDbRequest(method: 'getMint', params: {"hash": hash}); } catch (err) { print('Error getting mint:: $err'); return null; @@ -377,7 +378,7 @@ class ApiDatabase { Future getAllVtts() async { try { - return await _processIsolate(method: 'getAllVtts', params: {}); + return await _processDbRequest(method: 'getAllVtts', params: {}); } catch (err) { print('Error getting vtts:: $err'); } @@ -385,7 +386,7 @@ class ApiDatabase { Future loadWalletsDatabase() async { /// Get all Wallets - final result = await _processIsolate(method: 'loadWallets'); + final result = await _processDbRequest(method: 'loadWallets'); if (result.runtimeType == WalletStorage) { WalletStorage storage = result; walletStorage = storage; @@ -399,13 +400,13 @@ class ApiDatabase { Future updateWallet(Wallet wallet) async { walletStorage.wallets[wallet.id] = wallet; - return await _processIsolate( + return await _processDbRequest( method: 'update', params: {'type': 'wallet', 'value': wallet.jsonMap()}); } Future updateVtt(String walletId, ValueTransferInfo vtt) async { - return await _processIsolate( + return await _processDbRequest( method: 'update', params: {'type': 'vtt', 'value': vtt.jsonMap()}); } @@ -418,39 +419,39 @@ class ApiDatabase { } Future updateMint(String walletId, MintEntry mint) async { - return await _processIsolate( + return await _processDbRequest( method: 'update', params: {'type': 'mint', 'value': mint.jsonMap()}); } Future updateStake(String walletId, StakeEntry stake) async { - return await _processIsolate( + return await _processDbRequest( method: 'update', params: {'type': 'stake', 'value': stake.jsonMap()}); } Future updateUnstake(String walletId, UnstakeEntry unstake) async { - return await _processIsolate( + return await _processDbRequest( method: 'update', params: {'type': 'unstake', 'value': unstake.jsonMap()}); } Future deleteVtt(ValueTransferInfo vtt) async { - return await _processIsolate( + return await _processDbRequest( method: 'delete', params: {'value': vtt.jsonMap(), 'type': 'vtt'}); } Future deleteStake(StakeEntry stake) async { - return await _processIsolate( + return await _processDbRequest( method: 'delete', params: {'type': 'stake', 'value': stake.jsonMap()}); } Future deleteUnstake(UnstakeEntry unstake) async { - return await _processIsolate( + return await _processDbRequest( method: 'delete', params: {'type': 'unstake', 'value': unstake.jsonMap()}); } Future updateAccount(Account account) async { - return await _processIsolate( + return await _processDbRequest( method: 'update', params: {'type': 'account', 'value': account.jsonMap()}); } diff --git a/lib/shared/locator.dart b/lib/shared/locator.dart index 1bd771a10..221dac3e8 100644 --- a/lib/shared/locator.dart +++ b/lib/shared/locator.dart @@ -5,7 +5,7 @@ import 'package:my_wit_wallet/bloc/crypto/crypto_bloc.dart'; import 'package:my_wit_wallet/util/panel.dart'; import 'package:my_wit_wallet/util/preferences.dart'; import 'package:my_wit_wallet/util/storage/cache/implementations/vtt_get_through_block_explorer.dart'; -import 'package:my_wit_wallet/util/storage/database/database_isolate.dart'; +import 'package:my_wit_wallet/util/storage/database/database_manager.dart'; import 'package:my_wit_wallet/bloc/explorer/api_explorer.dart'; import 'package:my_wit_wallet/shared/api_database.dart'; import 'package:my_wit_wallet/shared/api_theme.dart'; @@ -29,7 +29,7 @@ class Locator { register(ApiCreateWallet()); register(ApiCrypto()); register(CryptoIsolate.instance()); - register(DatabaseIsolate.instance()); + register(DatabaseManager.instance()); register(VttGetThroughBlockExplorer()); } @@ -40,7 +40,7 @@ class Locator { } Future initialize() async { - await Locator.instance().init(); + await Locator.instance().init(); return true; } diff --git a/lib/theme/dark_theme.dart b/lib/theme/dark_theme.dart index cc58db768..168aede0e 100644 --- a/lib/theme/dark_theme.dart +++ b/lib/theme/dark_theme.dart @@ -303,7 +303,7 @@ DatePickerThemeData datePickerTheme = DatePickerThemeData( ); SliderThemeData sliderTheme = SliderThemeData( - showValueIndicator: ShowValueIndicator.always, + showValueIndicator: ShowValueIndicator.onDrag, valueIndicatorColor: WitnetPallet.brightCyan, thumbColor: WitnetPallet.brightCyan, activeTrackColor: WitnetPallet.brightCyan, diff --git a/lib/theme/light_theme.dart b/lib/theme/light_theme.dart index 237b801cb..126817a27 100644 --- a/lib/theme/light_theme.dart +++ b/lib/theme/light_theme.dart @@ -310,7 +310,7 @@ DatePickerThemeData datePickerTheme = DatePickerThemeData( confirmButtonStyle: textButtonTheme.style, ); SliderThemeData sliderTheme = SliderThemeData( - showValueIndicator: ShowValueIndicator.always, + showValueIndicator: ShowValueIndicator.onDrag, valueIndicatorColor: WitnetPallet.brightCyan, thumbColor: WitnetPallet.brightCyan, activeTrackColor: WitnetPallet.brightCyan, diff --git a/lib/util/storage/database/database_isolate.dart b/lib/util/storage/database/database_manager.dart similarity index 79% rename from lib/util/storage/database/database_isolate.dart rename to lib/util/storage/database/database_manager.dart index 765a07f19..66555158b 100644 --- a/lib/util/storage/database/database_isolate.dart +++ b/lib/util/storage/database/database_manager.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:convert'; import 'dart:isolate'; import 'package:my_wit_wallet/util/storage/database/stats.dart'; @@ -31,30 +30,23 @@ Map)> 'verifyPassword': _verifyPassword, }; -class DatabaseIsolate { - static final DatabaseIsolate _databaseIsolate = DatabaseIsolate._internal(); - DatabaseIsolate._internal(); +class DatabaseManager { + static final DatabaseManager _databaseManager = DatabaseManager._internal(); + DatabaseManager._internal(); - late Isolate isolate; late SendPort sendPort; - late ReceivePort receivePort; bool initialized = false; bool loading = false; - factory DatabaseIsolate.instance() => _databaseIsolate; + factory DatabaseManager.instance() => _databaseManager; Future init() async { loading = true; - if (initialized == false) { - _databaseIsolate.receivePort = ReceivePort(); - _databaseIsolate.isolate = await Isolate.spawn( - _dbIsolate, _databaseIsolate.receivePort.sendPort); - _databaseIsolate.sendPort = - await _databaseIsolate.receivePort.first as SendPort; - + if (!initialized) { + DatabaseService.instance(); initialized = true; - loading = false; } + loading = false; } void send({ @@ -62,32 +54,11 @@ class DatabaseIsolate { required Map params, required SendPort port, }) { - _databaseIsolate.sendPort.send(['$method?${json.encode(params)}', port]); + final dbService = DatabaseService.instance(); + methodMap[method]!(dbService, port, params); } } -void _dbIsolate(SendPort sendPort) async { - // open our receive port - try { - DatabaseService dbService = DatabaseService.instance(); - - ReceivePort receivePort = ReceivePort(); - - // tell whoever created us what port they can reach us - sendPort.send(receivePort.sendPort); - - // listen for messages - await for (var msg in receivePort) { - var data = msg[0] as String; - SendPort port = msg[1]; - var method = data.split('?')[0]; - var params = json.decode(data.split('?')[1]); - await methodMap[method]!(dbService, port, params); - } - receivePort.close(); - } catch (e) {} -} - Future _lock( final DatabaseService dbService, SendPort port, @@ -122,7 +93,9 @@ Future _setPassword( Map params, ) async { bool exists = await dbService.setPassword( - oldPassword: params['oldPassword'], newPassword: params['newPassword']); + oldPassword: params['oldPassword'], + newPassword: params['newPassword'], + ); port.send(exists); } @@ -133,7 +106,10 @@ Future _configure( Map params, ) async { await dbService.configure( - params['path'], params['fileExists'], params['apiVersion']); + params['path'], + params['fileExists'], + params['apiVersion'], + ); port.send({'unlocked': true}); } @@ -206,8 +182,11 @@ Future _deleteRecord( port.send(value); } -Future _deleteDatabase(DatabaseService dbService, SendPort port, - Map params) async { +Future _deleteDatabase( + DatabaseService dbService, + SendPort port, + Map params, +) async { bool databaseDeleted = await dbService.deleteDatabase(); port.send(databaseDeleted); } @@ -248,8 +227,11 @@ Future _updateRecord( port.send(value); } -Future _getStatsByAddress(DatabaseService dbService, SendPort port, - Map params) async { +Future _getStatsByAddress( + DatabaseService dbService, + SendPort port, + Map params, +) async { AccountStats? accountStats = await dbService.getStatsByAddress(params['address']); port.send(accountStats); diff --git a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/01_recipient_step.dart b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/01_recipient_step.dart index db1d36f77..2a603210f 100644 --- a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/01_recipient_step.dart +++ b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/01_recipient_step.dart @@ -502,8 +502,8 @@ class RecipientStepState extends State Text(localization.authorization, style: theme.textTheme.labelLarge), SizedBox(width: 8), Tooltip( - height: 60, message: localization.autorizationTooltip, + constraints: BoxConstraints(minHeight: 60), child: MouseRegion( cursor: SystemMouseCursors.click, child: Icon(FontAwesomeIcons.circleQuestion, diff --git a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/02_select_miner_fee.dart b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/02_select_miner_fee.dart index 1f0b4e368..b139b828b 100644 --- a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/02_select_miner_fee.dart +++ b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/02_select_miner_fee.dart @@ -287,8 +287,8 @@ class SelectMinerFeeStepState extends State Padding( padding: EdgeInsets.only(right: 8), child: Tooltip( - height: 100, message: localization.minerFeeHint, + constraints: BoxConstraints(minHeight: 100), child: MouseRegion( cursor: SystemMouseCursors.click, child: Icon(FontAwesomeIcons.circleQuestion, diff --git a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/timelock_input.dart b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/timelock_input.dart index e0974ec63..fd6816503 100644 --- a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/timelock_input.dart +++ b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/timelock_input.dart @@ -38,8 +38,8 @@ class TimelockInput extends StatelessWidget { Text(localization.timelock, style: theme.textTheme.labelLarge), SizedBox(width: 8), Tooltip( - height: 60, message: localization.timelockTooltip, + constraints: BoxConstraints(minHeight: 60), child: MouseRegion( cursor: SystemMouseCursors.click, child: Icon(FontAwesomeIcons.circleQuestion, diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 916c25b93..90a2c8e54 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -15,7 +15,7 @@ import url_launcher_macos import window_manager func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - FLALocalAuthPlugin.register(with: registry.registrar(forPlugin: "FLALocalAuthPlugin")) + LocalAuthPlugin.register(with: registry.registrar(forPlugin: "LocalAuthPlugin")) MobileScannerPlugin.register(with: registry.registrar(forPlugin: "MobileScannerPlugin")) OpenFilePlugin.register(with: registry.registrar(forPlugin: "OpenFilePlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) diff --git a/macos/Podfile b/macos/Podfile index 697b9b322..7ac5f0fd5 100644 --- a/macos/Podfile +++ b/macos/Podfile @@ -37,7 +37,7 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_macos_build_settings(target) target.build_configurations.each do |config| - config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.14' + config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.15' end end end diff --git a/pubspec.yaml b/pubspec.yaml index 374f4ec81..dd0fbf7d6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,10 +39,10 @@ dependencies: equatable: ^2.0.5 sliding_up_panel: ^2.0.0+1 decimal: 3.2.1 - witnet: 0.5.0 + witnet: 0.7.0 path_provider: ^2.0.8 permission_handler: ^11.0.1 - open_file: ^3.3.2 + open_file: ^3.5.10 qr_flutter: ^4.1.0 window_manager: ^0.3.6 url_launcher: ^6.1.14 @@ -52,12 +52,11 @@ dependencies: flutter_hooks: ^0.20.2 flutter_svg: ^2.0.7 number_paginator: ^0.4.0 - local_auth: ^2.3.0 + local_auth: ^3.0.0 flutter_json_viewer: ^1.0.1 updat: ^1.2.0+1 logger: ^2.4.0 pub_semver: ^2.1.4 - flutter_native_splash: ^2.4.3 flutter_launcher_icons: android: true