diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index 0ac065a4f..852e6ad0d 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,6 +1,4 @@ -Monero 12-word seed support (Wallet Groups support as well) -Integrate DFX's OpenCryptoPay -Exchange flow enhancements -Hardware Wallets flow enhancements -Minor UI enhancements +Background sync improvements +Payment notifications +UI/UX improvements Bug fixes \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index 0ac065a4f..c766c39ff 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,6 +1,5 @@ -Monero 12-word seed support (Wallet Groups support as well) -Integrate DFX's OpenCryptoPay -Exchange flow enhancements -Hardware Wallets flow enhancements -Minor UI enhancements +Background sync improvements +Payment notifications +WalletConnect enhancements +UI/UX improvements Bug fixes \ No newline at end of file diff --git a/cw_zano/lib/zano_formatter.dart b/cw_zano/lib/zano_formatter.dart index e20e3a5f7..4aa35b1b1 100644 --- a/cw_zano/lib/zano_formatter.dart +++ b/cw_zano/lib/zano_formatter.dart @@ -1,7 +1,6 @@ import 'dart:math'; import 'package:cw_core/utils/print_verbose.dart'; -import 'package:cw_zano/zano_wallet_api.dart'; import 'package:decimal/decimal.dart'; import 'package:decimal/intl.dart'; import 'package:fluttertoast/fluttertoast.dart'; @@ -57,7 +56,9 @@ class ZanoFormatter { static int parseAmount(String amount, [int decimalPoint = defaultDecimalPoint]) { final resultBigInt = (Decimal.parse(amount) * Decimal.fromBigInt(BigInt.from(10).pow(decimalPoint))).toBigInt(); if (!resultBigInt.isValidInt) { - Fluttertoast.showToast(msg: 'Cannot transfer $amount. Maximum is ${intAmountToString(resultBigInt.toInt(), decimalPoint)}.'); + try { + Fluttertoast.showToast(msg: 'Cannot transfer $amount. Maximum is ${intAmountToString(resultBigInt.toInt(), decimalPoint)}.'); + } catch (_) {} } return resultBigInt.toInt(); } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d3ba59827..50ca9d6de 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,7 +1,6 @@ PODS: - connectivity_plus (0.0.1): - Flutter - - ReachabilitySwift - CryptoSwift (1.8.4) - cw_decred (0.0.1): - Flutter @@ -59,6 +58,8 @@ PODS: - OrderedSet (~> 6.0.3) - flutter_local_authentication (1.2.0): - Flutter + - flutter_local_notifications (0.0.1): + - Flutter - flutter_mailer (0.0.1): - Flutter - flutter_secure_storage (6.0.0): @@ -77,7 +78,9 @@ PODS: - FlutterMacOS - permission_handler_apple (9.3.0): - Flutter - - ReachabilitySwift (5.2.4) + - reown_yttrium (0.0.1): + - Flutter + - YttriumWrapper (= 0.8.35) - SDWebImage (5.20.0): - SDWebImage/Core (= 5.20.0) - SDWebImage/Core (5.20.0) @@ -100,6 +103,7 @@ PODS: - Flutter - wakelock_plus (0.0.1): - Flutter + - YttriumWrapper (0.8.35) DEPENDENCIES: - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) @@ -114,6 +118,7 @@ DEPENDENCIES: - Flutter (from `Flutter`) - flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) - flutter_local_authentication (from `.symlinks/plugins/flutter_local_authentication/ios`) + - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_mailer (from `.symlinks/plugins/flutter_mailer/ios`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) @@ -122,6 +127,7 @@ DEPENDENCIES: - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) + - reown_yttrium (from `.symlinks/plugins/reown_yttrium/ios`) - sensitive_clipboard (from `.symlinks/plugins/sensitive_clipboard/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) @@ -137,9 +143,9 @@ SPEC REPOS: - DKImagePickerController - DKPhotoGallery - OrderedSet - - ReachabilitySwift - SDWebImage - SwiftyGif + - YttriumWrapper EXTERNAL SOURCES: connectivity_plus: @@ -164,6 +170,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_inappwebview_ios/ios" flutter_local_authentication: :path: ".symlinks/plugins/flutter_local_authentication/ios" + flutter_local_notifications: + :path: ".symlinks/plugins/flutter_local_notifications/ios" flutter_mailer: :path: ".symlinks/plugins/flutter_mailer/ios" flutter_secure_storage: @@ -180,6 +188,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/path_provider_foundation/darwin" permission_handler_apple: :path: ".symlinks/plugins/permission_handler_apple/ios" + reown_yttrium: + :path: ".symlinks/plugins/reown_yttrium/ios" sensitive_clipboard: :path: ".symlinks/plugins/sensitive_clipboard/ios" share_plus: @@ -198,7 +208,7 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/wakelock_plus/ios" SPEC CHECKSUMS: - connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d + connectivity_plus: 2a701ffec2c0ae28a48cf7540e279787e77c447d CryptoSwift: e64e11850ede528a02a0f3e768cec8e9d92ecb90 cw_decred: 9c0e1df74745b51a1289ec5e91fb9e24b68fa14a cw_mweb: 22cd01dfb8ad2d39b15332006f22046aaa8352a3 @@ -212,6 +222,7 @@ SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4 flutter_local_authentication: 1172a4dd88f6306dadce067454e2c4caf07977bb + flutter_local_notifications: ff50f8405aaa0ccdc7dcfb9022ca192e8ad9688f flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83 flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be fluttertoast: 21eecd6935e7064cc1fcb733a4c5a428f3f24f0f @@ -221,7 +232,7 @@ SPEC CHECKSUMS: package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 - ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda + reown_yttrium: c0e87e5965fa60a3559564cc35cffbba22976089 SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8 sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986 share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f @@ -231,8 +242,9 @@ SPEC CHECKSUMS: uni_links: d97da20c7701486ba192624d99bffaaffcfc298a universal_ble: cf52a7b3fd2e7c14d6d7262e9fdadb72ab6b88a6 url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe - wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56 + wakelock_plus: 76957ab028e12bfa4e66813c99e46637f367fc7e + YttriumWrapper: 31e937fe9fbe0f1314d2ca6be9ce9b379a059966 -PODFILE CHECKSUM: e448f662d4c41f0c0b1ccbb78afd57dbf895a597 +PODFILE CHECKSUM: 5296465b1c6d14d506230356756826012f65d97a COCOAPODS: 1.16.2 diff --git a/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart b/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart index 47d522173..33839a25f 100644 --- a/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart +++ b/lib/src/screens/dashboard/pages/balance/balance_row_widget.dart @@ -87,10 +87,7 @@ class BalanceRowWidget extends StatelessWidget { // ], ), child: TextButton( - onPressed: () => Fluttertoast.showToast( - msg: S.current.show_balance_toast, - backgroundColor: Color.fromRGBO(0, 0, 0, 0.85), - ), + onPressed: _showToast, onLongPress: () => dashboardViewModel.balanceViewModel.switchBalanceValue(), style: TextButton.styleFrom( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)), @@ -366,10 +363,7 @@ class BalanceRowWidget extends StatelessWidget { // ], ), child: TextButton( - onPressed: () => Fluttertoast.showToast( - msg: S.current.show_balance_toast, - backgroundColor: Color.fromRGBO(0, 0, 0, 0.85), - ), + onPressed: _showToast, onLongPress: () => dashboardViewModel.balanceViewModel.switchBalanceValue(), style: TextButton.styleFrom( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)), @@ -709,4 +703,13 @@ class BalanceRowWidget extends StatelessWidget { void _showBalanceDescription(BuildContext context, String content) { showPopUp(context: context, builder: (_) => InformationPage(information: content)); } + + void _showToast() async { + try { + await Fluttertoast.showToast( + msg: S.current.show_balance_toast, + backgroundColor: Color.fromRGBO(0, 0, 0, 0.85), + ); + } catch (_) {} + } } diff --git a/lib/utils/exception_handler.dart b/lib/utils/exception_handler.dart index 547ffa571..a9348dd33 100644 --- a/lib/utils/exception_handler.dart +++ b/lib/utils/exception_handler.dart @@ -230,6 +230,8 @@ class ExceptionHandler { static Future _addDeviceInfo(File file) async { final packageInfo = await PackageInfo.fromPlatform(); final currentVersion = packageInfo.version; + final appName = packageInfo.appName; + final package = packageInfo.packageName; final deviceInfoPlugin = DeviceInfoPlugin(); Map deviceInfo = {}; @@ -252,7 +254,7 @@ class ExceptionHandler { } await file.writeAsString( - "App Version: $currentVersion\n\nDevice Info $deviceInfo\n\n", + "App Version: $currentVersion\nApp Name: $appName\nPackage: $package\n\nDevice Info $deviceInfo\n\n", mode: FileMode.append, ); } diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index b0137103e..100208464 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -541,7 +541,8 @@ abstract class DashboardViewModelBase with Store { } @observable - late bool backgroundSyncNotificationsEnabled = sharedPreferences.getBool(PreferencesKey.backgroundSyncNotificationsEnabled) ?? false; + late bool backgroundSyncNotificationsEnabled = + sharedPreferences.getBool(PreferencesKey.backgroundSyncNotificationsEnabled) ?? false; @action Future setBackgroundSyncNotificationsEnabled(bool value) async { @@ -561,7 +562,6 @@ abstract class DashboardViewModelBase with Store { await sharedPreferences.setBool(PreferencesKey.backgroundSyncNotificationsEnabled, value); } - bool get hasBgsyncNetworkConstraints => Platform.isAndroid; bool get hasBgsyncBatteryNotLowConstraints => Platform.isAndroid; bool get hasBgsyncChargingConstraints => Platform.isAndroid; @@ -578,12 +578,14 @@ abstract class DashboardViewModelBase with Store { @observable bool backgroundSyncDeviceIdle = false; - + Future _loadConstraints() async { - backgroundSyncNetworkUnmetered = await FlutterDaemon().getNetworkType(); - backgroundSyncBatteryNotLow = await FlutterDaemon().getBatteryNotLow(); - backgroundSyncCharging = await FlutterDaemon().getRequiresCharging(); - backgroundSyncDeviceIdle = await FlutterDaemon().getDeviceIdle(); + if (Platform.isAndroid) { + backgroundSyncNetworkUnmetered = await FlutterDaemon().getNetworkType(); + backgroundSyncBatteryNotLow = await FlutterDaemon().getBatteryNotLow(); + backgroundSyncCharging = await FlutterDaemon().getRequiresCharging(); + backgroundSyncDeviceIdle = await FlutterDaemon().getDeviceIdle(); + } } @action @@ -621,7 +623,7 @@ abstract class DashboardViewModelBase with Store { await enableBackgroundSync(); } } - + bool get hasBatteryOptimization => Platform.isAndroid; @observable diff --git a/lib/view_model/link_view_model.dart b/lib/view_model/link_view_model.dart index 27f0c0560..1a89943d4 100644 --- a/lib/view_model/link_view_model.dart +++ b/lib/view_model/link_view_model.dart @@ -81,14 +81,16 @@ class LinkViewModel { } Future _errorToast(String message, {double fontSize = 16}) async { - Fluttertoast.showToast( - msg: message, - toastLength: Toast.LENGTH_LONG, - gravity: ToastGravity.SNACKBAR, - backgroundColor: Colors.black, - textColor: Colors.white, - fontSize: fontSize, - ); + try { + await Fluttertoast.showToast( + msg: message, + toastLength: Toast.LENGTH_LONG, + gravity: ToastGravity.SNACKBAR, + backgroundColor: Colors.black, + textColor: Colors.white, + fontSize: fontSize, + ); + } catch (_) {} } Future handleLink() async { diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 689f0ea03..5b209b0cf 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -1,7 +1,6 @@ PODS: - connectivity_plus (0.0.1): - FlutterMacOS - - ReachabilitySwift - cw_mweb (0.0.1): - FlutterMacOS - device_info_plus (0.0.1): @@ -15,6 +14,8 @@ PODS: - OrderedSet (~> 6.0.3) - flutter_local_authentication (1.2.0): - FlutterMacOS + - flutter_local_notifications (0.0.1): + - FlutterMacOS - flutter_secure_storage_macos (6.1.1): - FlutterMacOS - FlutterMacOS (1.0.0) @@ -26,7 +27,6 @@ PODS: - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - ReachabilitySwift (5.2.4) - share_plus (0.0.1): - FlutterMacOS - shared_preferences_foundation (0.0.1): @@ -50,6 +50,7 @@ DEPENDENCIES: - fast_scanner (from `Flutter/ephemeral/.symlinks/plugins/fast_scanner/macos`) - flutter_inappwebview_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos`) - flutter_local_authentication (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_authentication/macos`) + - flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`) - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) - FlutterMacOS (from `Flutter/ephemeral`) - in_app_review (from `Flutter/ephemeral/.symlinks/plugins/in_app_review/macos`) @@ -65,7 +66,6 @@ DEPENDENCIES: SPEC REPOS: trunk: - OrderedSet - - ReachabilitySwift EXTERNAL SOURCES: connectivity_plus: @@ -82,6 +82,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos flutter_local_authentication: :path: Flutter/ephemeral/.symlinks/plugins/flutter_local_authentication/macos + flutter_local_notifications: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos flutter_secure_storage_macos: :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos FlutterMacOS: @@ -106,20 +108,20 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos SPEC CHECKSUMS: - connectivity_plus: 18d3c32514c886e046de60e9c13895109866c747 + connectivity_plus: 0a976dfd033b59192912fa3c6c7b54aab5093802 cw_mweb: 7440b12ead811dda972a9918442ea2a458e8742c device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225 fast_scanner: d31bae07e2653403a69dac99fb710c1722b16a97 flutter_inappwebview_macos: bdf207b8f4ebd58e86ae06cd96b147de99a67c9b flutter_local_authentication: 85674893931e1c9cfa7c9e4f5973cb8c56b018b0 + flutter_local_notifications: 4ccab5b7a22835214a6672e3f9c5e8ae207dab36 flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 in_app_review: a6a031b9acd03c7d103e341aa334adf2c493fb93 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda share_plus: 1fa619de8392a4398bfaf176d441853922614e89 shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 sp_scanner: 269d96e0ec3173e69156be7239b95182be3b8303 diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 4de7a3373..817b6aeda 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -14,15 +14,15 @@ TYPES=($MONERO_COM $CAKEWALLET) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="4.26.0" -MONERO_COM_BUILD_NUMBER=120 +MONERO_COM_VERSION="4.27.0" +MONERO_COM_BUILD_NUMBER=121 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" MONERO_COM_SCHEME="monero.com" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.26.0" -CAKEWALLET_BUILD_NUMBER=258 +CAKEWALLET_VERSION="4.27.0" +CAKEWALLET_BUILD_NUMBER=259 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" CAKEWALLET_SCHEME="cakewallet" diff --git a/scripts/ios/app_env.sh b/scripts/ios/app_env.sh index b42a8a2da..a6d01f16e 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -12,13 +12,13 @@ TYPES=($MONERO_COM $CAKEWALLET) APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="4.26.0" -MONERO_COM_BUILD_NUMBER=117 +MONERO_COM_VERSION="4.27.1" +MONERO_COM_BUILD_NUMBER=120 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.26.0" -CAKEWALLET_BUILD_NUMBER=312 +CAKEWALLET_VERSION="4.27.1" +CAKEWALLET_BUILD_NUMBER=314 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" diff --git a/scripts/linux/app_env.sh b/scripts/linux/app_env.sh index 574cce2c9..9e3676b22 100755 --- a/scripts/linux/app_env.sh +++ b/scripts/linux/app_env.sh @@ -14,8 +14,8 @@ if [ -n "$1" ]; then fi CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.26.0" -CAKEWALLET_BUILD_NUMBER=52 +CAKEWALLET_VERSION="4.27.0" +CAKEWALLET_BUILD_NUMBER=54 if ! [[ " ${TYPES[*]} " =~ " ${APP_LINUX_TYPE} " ]]; then echo "Wrong app type." diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index 651ad48e9..f99cee740 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -16,13 +16,13 @@ if [ -n "$1" ]; then fi MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="4.26.0" -MONERO_COM_BUILD_NUMBER=49 +MONERO_COM_VERSION="4.27.0" +MONERO_COM_BUILD_NUMBER=51 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.26.0" -CAKEWALLET_BUILD_NUMBER=111 +CAKEWALLET_VERSION="4.27.0" +CAKEWALLET_BUILD_NUMBER=113 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then diff --git a/scripts/windows/build_exe_installer.iss b/scripts/windows/build_exe_installer.iss index 1f152f635..56285af77 100644 --- a/scripts/windows/build_exe_installer.iss +++ b/scripts/windows/build_exe_installer.iss @@ -1,5 +1,5 @@ #define MyAppName "Cake Wallet" -#define MyAppVersion "4.26.0" +#define MyAppVersion "4.27.0" #define MyAppPublisher "Cake Labs LLC" #define MyAppURL "https://cakewallet.com/" #define MyAppExeName "CakeWallet.exe"