From 665770c733f67a35d1bfa44747056546cbbbe36b Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 7 Sep 2023 22:52:03 +0300 Subject: [PATCH] Fix conflicts with main --- cw_bitcoin/lib/bitcoin_wallet_service.dart | 5 +- cw_ethereum/lib/ethereum_wallet.dart | 1 - lib/core/wallet_loading_service.dart | 26 +-- lib/di.dart | 2 - .../on_wallet_sync_status_change.dart | 6 +- .../screens/new_wallet/new_wallet_page.dart | 109 ++++++---- .../wallet_unlock/wallet_unlock_page.dart | 197 +++++++++--------- linux/flutter/generated_plugin_registrant.cc | 4 + linux/flutter/generated_plugins.cmake | 1 + macos/Flutter/GeneratedPluginRegistrant.swift | 6 +- pubspec_base.yaml | 4 +- tool/configure.dart | 8 +- 12 files changed, 197 insertions(+), 172 deletions(-) diff --git a/cw_bitcoin/lib/bitcoin_wallet_service.dart b/cw_bitcoin/lib/bitcoin_wallet_service.dart index 776ce0231..743f53379 100644 --- a/cw_bitcoin/lib/bitcoin_wallet_service.dart +++ b/cw_bitcoin/lib/bitcoin_wallet_service.dart @@ -17,7 +17,7 @@ class BitcoinWalletService extends WalletService< BitcoinNewWalletCredentials, BitcoinRestoreWalletFromSeedCredentials, BitcoinRestoreWalletFromWIFCredentials> { - BitcoinWalletService(this.walletInfoSource, this.unspentCoinsInfoSource); + BitcoinWalletService(this.walletInfoSource, this.unspentCoinsInfoSource, this.isDirect); final Box walletInfoSource; final Box unspentCoinsInfoSource; @@ -74,7 +74,8 @@ class BitcoinWalletService extends WalletService< password: password, name: currentName, walletInfo: currentWalletInfo, - unspentCoinsInfo: unspentCoinsInfoSource); + unspentCoinsInfo: unspentCoinsInfoSource, + encryptionFileUtils: encryptionFileUtilsFor(isDirect)); await currentWallet.renameWalletFiles(newName); diff --git a/cw_ethereum/lib/ethereum_wallet.dart b/cw_ethereum/lib/ethereum_wallet.dart index 5e082e484..80a5aac32 100644 --- a/cw_ethereum/lib/ethereum_wallet.dart +++ b/cw_ethereum/lib/ethereum_wallet.dart @@ -26,7 +26,6 @@ import 'package:cw_ethereum/ethereum_transaction_info.dart'; import 'package:cw_ethereum/ethereum_transaction_model.dart'; import 'package:cw_ethereum/ethereum_transaction_priority.dart'; import 'package:cw_ethereum/ethereum_wallet_addresses.dart'; -import 'package:cw_ethereum/file.dart'; import 'package:cw_core/erc20_token.dart'; import 'package:hive/hive.dart'; import 'package:hex/hex.dart'; diff --git a/lib/core/wallet_loading_service.dart b/lib/core/wallet_loading_service.dart index 3323e7831..9596015bc 100644 --- a/lib/core/wallet_loading_service.dart +++ b/lib/core/wallet_loading_service.dart @@ -7,26 +7,24 @@ import 'package:cw_core/wallet_type.dart'; import 'package:shared_preferences/shared_preferences.dart'; class WalletLoadingService { - WalletLoadingService( - this.sharedPreferences, this.keyService, this.walletServiceFactory); + WalletLoadingService(this.sharedPreferences, this.keyService, this.walletServiceFactory); final SharedPreferences sharedPreferences; final KeyService keyService; final WalletService Function(WalletType type) walletServiceFactory; - Future renameWallet( - WalletType type, String name, String newName) async { + Future renameWallet(WalletType type, String name, String newName, + {String? password}) async { final walletService = walletServiceFactory.call(type); - final password = await keyService.getWalletPassword(walletName: name); + final walletPassword = password ?? (await keyService.getWalletPassword(walletName: name)); // Save the current wallet's password to the new wallet name's key - await keyService.saveWalletPassword( - walletName: newName, password: password); + await keyService.saveWalletPassword(walletName: newName, password: walletPassword); // Delete previous wallet name from keyService to keep only new wallet's name // otherwise keeps duplicate (old and new names) await keyService.deleteWalletPassword(walletName: name); - await walletService.rename(name, password, newName); + await walletService.rename(name, walletPassword, newName); // set shared preferences flag based on previous wallet name if (type == WalletType.monero) { @@ -37,10 +35,10 @@ class WalletLoadingService { } } - Future load(WalletType type, String name) async { + Future load(WalletType type, String name, {String? password}) async { final walletService = walletServiceFactory.call(type); - final password = await keyService.getWalletPassword(walletName: name); - final wallet = await walletService.openWallet(name, password); + final walletPassword = password ?? (await keyService.getWalletPassword(walletName: name)); + final wallet = await walletService.openWallet(name, walletPassword); if (type == WalletType.monero) { await updateMoneroWalletPassword(wallet); @@ -61,11 +59,9 @@ class WalletLoadingService { // Save new generated password with backup key for case where // wallet will change password, but it will fail to update in secure storage final bakWalletName = '#__${wallet.name}_bak__#'; - await keyService.saveWalletPassword( - walletName: bakWalletName, password: password); + await keyService.saveWalletPassword(walletName: bakWalletName, password: password); await wallet.changePassword(password); - await keyService.saveWalletPassword( - walletName: wallet.name, password: password); + await keyService.saveWalletPassword(walletName: wallet.name, password: password); isPasswordUpdated = true; await sharedPreferences.setBool(key, isPasswordUpdated); } diff --git a/lib/di.dart b/lib/di.dart index ef3d60ebe..44d74922a 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -195,8 +195,6 @@ import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:cake_wallet/core/secure_storage.dart'; -import 'package:cake_wallet/view_model/wallet_restoration_from_seed_vm.dart'; -import 'package:cake_wallet/view_model/wallet_restoration_from_keys_vm.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:cake_wallet/core/wallet_creation_service.dart'; import 'package:cake_wallet/store/app_store.dart'; diff --git a/lib/reactions/on_wallet_sync_status_change.dart b/lib/reactions/on_wallet_sync_status_change.dart index 767bfd7e8..9a13db597 100644 --- a/lib/reactions/on_wallet_sync_status_change.dart +++ b/lib/reactions/on_wallet_sync_status_change.dart @@ -7,7 +7,7 @@ import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/balance.dart'; import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/sync_status.dart'; -import 'package:wakelock/wakelock.dart'; +import 'package:wakelock_plus/wakelock_plus.dart'; ReactionDisposer? _onWalletSyncStatusChangeReaction; @@ -27,10 +27,10 @@ void startWalletSyncStatusChangeReaction( } } if (status is SyncingSyncStatus) { - await Wakelock.enable(); + await WakelockPlus.enable(); } if (status is SyncedSyncStatus || status is FailedSyncStatus) { - await Wakelock.disable(); + await WakelockPlus.disable(); } } catch(e) { print(e.toString()); diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index fbc405177..6b1262020 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -54,7 +54,8 @@ class _WalletNameFormState extends State { _languageSelectorKey = GlobalKey(), _nameController = TextEditingController(), _passwordController = _walletNewVM.hasWalletPassword ? TextEditingController() : null, - _repeatedPasswordController = _walletNewVM.hasWalletPassword ? TextEditingController() : null; + _repeatedPasswordController = + _walletNewVM.hasWalletPassword ? TextEditingController() : null; static const aspectRatioImage = 1.22; @@ -128,15 +129,20 @@ class _WalletNameFormState extends State { hintStyle: TextStyle( fontSize: 18.0, fontWeight: FontWeight.w500, - color: Theme.of(context).extension()!.hintTextColor), + color: + Theme.of(context).extension()!.hintTextColor), hintText: S.of(context).wallet_name, focusedBorder: UnderlineInputBorder( borderSide: BorderSide( - color: Theme.of(context).extension()!.underlineColor, + color: Theme.of(context) + .extension()! + .underlineColor, width: 1.0)), enabledBorder: UnderlineInputBorder( borderSide: BorderSide( - color: Theme.of(context).extension()!.underlineColor, + color: Theme.of(context) + .extension()! + .underlineColor, width: 1.0), ), suffixIcon: Semantics( @@ -163,7 +169,9 @@ class _WalletNameFormState extends State { height: 34, child: Image.asset( 'assets/images/refresh_icon.png', - color: Theme.of(context).extension()!.textFieldButtonIconColor, + color: Theme.of(context) + .extension()! + .textFieldButtonIconColor, ), ), ), @@ -171,38 +179,42 @@ class _WalletNameFormState extends State { ), validator: WalletNameValidator(), ), - if (_walletNewVM.hasWalletPassword) - ...[TextFormField( + if (_walletNewVM.hasWalletPassword) ...[ + TextFormField( onChanged: (value) => _walletNewVM.walletPassword = value, controller: _passwordController, textAlign: TextAlign.center, obscureText: true, style: TextStyle( - fontSize: 20.0, - fontWeight: FontWeight.w600, - color: Theme.of(context).primaryTextTheme!.headline6!.color!), + fontSize: 20.0, + fontWeight: FontWeight.w600, + color: Theme.of(context).extension()!.titleColor, + ), decoration: InputDecoration( hintStyle: TextStyle( - fontSize: 18.0, - fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme!.headline2!.color!), + fontSize: 18.0, + fontWeight: FontWeight.w500, + color: + Theme.of(context).extension()!.hintTextColor, + ), hintText: S.of(context).password, focusedBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: Theme.of(context) - .accentTextTheme! - .headline2! - .decorationColor!, - width: 1.0)), + borderSide: BorderSide( + color: Theme.of(context) + .extension()! + .underlineColor, + width: 1.0, + ), + ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide( - color: Theme.of(context) - .accentTextTheme! - .headline2! - .decorationColor!, - width: 1.0), - ) - ) + color: Theme.of(context) + .extension()! + .underlineColor, + width: 1.0, + ), + ), + ), ), TextFormField( onChanged: (value) => _walletNewVM.repeatedWalletPassword = value, @@ -210,32 +222,37 @@ class _WalletNameFormState extends State { textAlign: TextAlign.center, obscureText: true, style: TextStyle( - fontSize: 20.0, - fontWeight: FontWeight.w600, - color: Theme.of(context).primaryTextTheme!.headline6!.color!), + fontSize: 20.0, + fontWeight: FontWeight.w600, + color: Theme.of(context).extension()!.titleColor, + ), decoration: InputDecoration( hintStyle: TextStyle( - fontSize: 18.0, - fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme!.headline2!.color!), + fontSize: 18.0, + fontWeight: FontWeight.w500, + color: + Theme.of(context).extension()!.hintTextColor, + ), hintText: S.of(context).repeate_wallet_password, focusedBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: Theme.of(context) - .accentTextTheme! - .headline2! - .decorationColor!, - width: 1.0)), + borderSide: BorderSide( + color: Theme.of(context) + .extension()! + .underlineColor, + width: 1.0, + ), + ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide( - color: Theme.of(context) - .accentTextTheme! - .headline2! - .decorationColor!, - width: 1.0), - ) - ) - )], + color: Theme.of(context) + .extension()! + .underlineColor, + width: 1.0, + ), + ), + ), + ), + ], ], ), ), diff --git a/lib/src/screens/wallet_unlock/wallet_unlock_page.dart b/lib/src/screens/wallet_unlock/wallet_unlock_page.dart index 42f5464c7..c4c8a2c33 100644 --- a/lib/src/screens/wallet_unlock/wallet_unlock_page.dart +++ b/lib/src/screens/wallet_unlock/wallet_unlock_page.dart @@ -4,6 +4,8 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/auth/auth_page.dart'; import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; +import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; +import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:flutter/cupertino.dart'; @@ -12,13 +14,10 @@ import 'package:cake_wallet/view_model/wallet_unlock_view_model.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:mobx/mobx.dart'; - class WalletUnlockPage extends StatefulWidget { WalletUnlockPage( - this.walletUnlockViewModel, - this.onAuthenticationFinished, - this.authPasswordHandler, - {required this.closable}); + this.walletUnlockViewModel, this.onAuthenticationFinished, this.authPasswordHandler, + {required this.closable}); final WalletUnlockViewModel walletUnlockViewModel; final OnAuthenticationFinished onAuthenticationFinished; @@ -26,17 +25,15 @@ class WalletUnlockPage extends StatefulWidget { final bool closable; @override - State createState() => WalletUnlockPageState(); + State createState() => WalletUnlockPageState(); } class WalletUnlockPageState extends AuthPageState { - WalletUnlockPageState() - : _passwordController = TextEditingController(); + WalletUnlockPageState() : _passwordController = TextEditingController(); final TextEditingController _passwordController; final _key = GlobalKey(); - final _backArrowImageDarkTheme = - Image.asset('assets/images/close_button.png'); + final _backArrowImageDarkTheme = Image.asset('assets/images/close_button.png'); ReactionDisposer? _reaction; Flushbar? _authBar; Flushbar? _progressBar; @@ -44,8 +41,7 @@ class WalletUnlockPageState extends AuthPageState { @override void initState() { - _reaction ??= - reaction((_) => widget.walletUnlockViewModel.state, (ExecutionState state) { + _reaction ??= reaction((_) => widget.walletUnlockViewModel.state, (ExecutionState state) { if (state is ExecutedSuccessfullyState) { WidgetsBinding.instance.addPostFrameCallback((_) { widget.onAuthenticationFinished(true, this); @@ -56,38 +52,36 @@ class WalletUnlockPageState extends AuthPageState { if (state is IsExecutingState) { WidgetsBinding.instance.addPostFrameCallback((_) { // null duration to make it indefinite until its disposed - _authBar = - createBar(S.of(context).authentication, duration: null) - ..show(context); + _authBar = createBar(S.of(context).authentication, duration: null)..show(context); }); } if (state is FailureState) { WidgetsBinding.instance.addPostFrameCallback((_) async { dismissFlushBar(_authBar); - showBar( - context, S.of(context).failed_authentication(state.error)); + showBar(context, S.of(context).failed_authentication(state.error)); widget.onAuthenticationFinished(false, this); }); } }); - - _passwordControllerListener = () => widget.walletUnlockViewModel.setPassword(_passwordController.text); + + _passwordControllerListener = + () => widget.walletUnlockViewModel.setPassword(_passwordController.text); if (_passwordControllerListener != null) { - _passwordController.addListener(_passwordControllerListener!); + _passwordController.addListener(_passwordControllerListener!); } - + super.initState(); } @override void dispose() { _reaction?.reaction.dispose(); - + if (_passwordControllerListener != null) { - _passwordController.removeListener(_passwordControllerListener!); + _passwordController.removeListener(_passwordControllerListener!); } super.dispose(); @@ -96,8 +90,7 @@ class WalletUnlockPageState extends AuthPageState { @override void changeProcessText(String text) { dismissFlushBar(_authBar); - _progressBar = createBar(text, duration: null) - ..show(_key.currentContext!); + _progressBar = createBar(text, duration: null)..show(_key.currentContext!); } @override @@ -134,83 +127,92 @@ class WalletUnlockPageState extends AuthPageState { @override Widget build(BuildContext context) { return Scaffold( - key: _key, - appBar: CupertinoNavigationBar( - leading: widget.closable - ? Container( - padding: EdgeInsets.only(top: 10), - child: SizedBox( - height: 37, - width: 37, - child: InkWell( - onTap: () => Navigator.of(context).pop(), - child: _backArrowImageDarkTheme, - ), - )) - : Container(), - backgroundColor: Theme.of(context).colorScheme.background, - border: null), - resizeToAvoidBottomInset: false, - body: Center( - child: ConstrainedBox( - constraints: BoxConstraints(maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded(child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text(widget.walletUnlockViewModel.walletName, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 24, - fontWeight: FontWeight.w500, - color: Theme.of(context).primaryTextTheme.titleLarge!.color!)), - SizedBox(height: 24), - Form( - child: TextFormField( - onChanged: (value) => null, - controller: _passwordController, + key: _key, + appBar: CupertinoNavigationBar( + leading: widget.closable + ? Container( + padding: EdgeInsets.only(top: 10), + child: SizedBox( + height: 37, + width: 37, + child: InkWell( + onTap: () => Navigator.of(context).pop(), + child: _backArrowImageDarkTheme, + ), + )) + : Container(), + backgroundColor: Theme.of(context).colorScheme.background, + border: null), + resizeToAvoidBottomInset: false, + body: Center( + child: ConstrainedBox( + constraints: BoxConstraints( + maxWidth: ResponsiveLayoutUtil.kDesktopMaxWidthConstraint, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + widget.walletUnlockViewModel.walletName, textAlign: TextAlign.center, - obscureText: true, style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.w500, + color: Theme.of(context).extension()!.titleColor, + ), + ), + SizedBox(height: 24), + Form( + child: TextFormField( + onChanged: (value) => null, + controller: _passwordController, + textAlign: TextAlign.center, + obscureText: true, + style: TextStyle( fontSize: 20.0, fontWeight: FontWeight.w600, - color: Theme.of(context).primaryTextTheme.titleLarge!.color!), - decoration: InputDecoration( - hintStyle: TextStyle( + color: Theme.of(context).extension()!.titleColor, + ), + decoration: InputDecoration( + hintStyle: TextStyle( fontSize: 18.0, fontWeight: FontWeight.w500, - color: Theme.of(context).accentTextTheme.displayMedium!.color!), - hintText: S.of(context).enter_wallet_password, - focusedBorder: UnderlineInputBorder( + color: Theme.of(context).extension()!.hintTextColor, + ), + hintText: S.of(context).enter_wallet_password, + focusedBorder: UnderlineInputBorder( borderSide: BorderSide( - color: Theme.of(context) - .accentTextTheme - .displayMedium! - .decorationColor!, - width: 1.0)), - enabledBorder: UnderlineInputBorder( - borderSide: BorderSide( - color: Theme.of(context) - .accentTextTheme - .displayMedium! - .decorationColor!, - width: 1.0), - ) - )))])), - Padding( - padding: EdgeInsets.only(bottom: 24), - child: Observer( - builder: (_) => - LoadingPrimaryButton( + color: Theme.of(context).extension()!.underlineColor, + width: 1.0, + ), + ), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide( + color: Theme.of(context).extension()!.underlineColor, + width: 1.0, + ), + ), + ), + ), + ), + ], + ), + ), + Padding( + padding: EdgeInsets.only(bottom: 24), + child: Observer( + builder: (_) => LoadingPrimaryButton( onPressed: () async { if (widget.authPasswordHandler != null) { try { - await widget.authPasswordHandler!(widget - .walletUnlockViewModel.password); + await widget + .authPasswordHandler!(widget.walletUnlockViewModel.password); widget.walletUnlockViewModel.success(); } catch (e) { widget.walletUnlockViewModel.failure(e); @@ -224,8 +226,13 @@ class WalletUnlockPageState extends AuthPageState { color: Colors.green, textColor: Colors.white, isLoading: widget.walletUnlockViewModel.state is IsExecutingState, - isDisabled: widget.walletUnlockViewModel.state is IsExecutingState))) - ])) - )); + isDisabled: widget.walletUnlockViewModel.state is IsExecutingState), + ), + ), + ], + ), + ), + ), + ); } } diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 77cfc4257..3020bf166 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -18,6 +19,9 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) devicelocale_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "DevicelocalePlugin"); devicelocale_plugin_register_with_registrar(devicelocale_registrar); + g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); + flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); g_autoptr(FlPluginRegistrar) platform_device_id_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "PlatformDeviceIdLinuxPlugin"); platform_device_id_linux_plugin_register_with_registrar(platform_device_id_linux_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index e432c44eb..9ae471cda 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -5,6 +5,7 @@ list(APPEND FLUTTER_PLUGIN_LIST cw_monero devicelocale + flutter_secure_storage_linux platform_device_id_linux url_launcher_linux ) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 90407f40e..48f6b31fb 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -9,6 +9,7 @@ import connectivity_plus_macos import cw_monero import device_info_plus import devicelocale +import flutter_secure_storage_macos import in_app_review import package_info_plus import path_provider_foundation @@ -17,13 +18,14 @@ import platform_device_id_macos import share_plus_macos import shared_preferences_foundation import url_launcher_macos -import wakelock_macos +import wakelock_plus func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) CwMoneroPlugin.register(with: registry.registrar(forPlugin: "CwMoneroPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin")) + FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin")) FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) @@ -32,5 +34,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) - WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) + WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin")) } diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 86a8fb2c5..7cca3d881 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -29,7 +29,7 @@ dependencies: hive_flutter: ^1.1.0 local_auth: ^2.1.0 local_auth_android: 1.0.21 - package_info_plus: ^3.1.0 + package_info_plus: ^4.1.0 devicelocale: git: url: https://github.com/cake-tech/flutter-devicelocale @@ -60,7 +60,7 @@ dependencies: device_display_brightness: ^0.0.6 workmanager: ^0.5.1 platform_device_id: ^1.0.1 - wakelock: ^0.6.2 + wakelock_plus: ^1.1.1 flutter_mailer: ^2.0.2 device_info_plus: 8.1.0 base32: 2.1.3 diff --git a/tool/configure.dart b/tool/configure.dart index 01d805e71..d7730f463 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -20,8 +20,8 @@ Future main(List args) async { await generateMonero(hasMonero); await generateHaven(hasHaven); await generateEthereum(hasEthereum); - await generatePubspec(hasMonero: hasMonero, hasBitcoin: hasBitcoin, hasHaven: hasHaven, hasFlutterSecureStorage: !excludeFlutterSecureStorage); - await generateWalletTypes(hasMonero: hasMonero, hasBitcoin: hasBitcoin, hasHaven: hasHaven); + await generatePubspec(hasMonero: hasMonero, hasBitcoin: hasBitcoin, hasHaven: hasHaven, hasEthereum: hasEthereum, hasFlutterSecureStorage: !excludeFlutterSecureStorage); + await generateWalletTypes(hasMonero: hasMonero, hasBitcoin: hasBitcoin, hasHaven: hasHaven, hasEthereum: hasEthereum); await injectSecureStorage(!excludeFlutterSecureStorage); } @@ -579,8 +579,8 @@ Future generatePubspec({ git: url: https://github.com/cake-tech/flutter_secure_storage.git path: flutter_secure_storage - ref: cake-6.0.0 - version: 6.0.0 + ref: cake-8.0.0 + version: 8.0.0 """; const cwEthereum = """ cw_ethereum: