From d1684f5be8e1a11408bc7d179cc6bdcde7178b4e Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Mon, 7 Aug 2023 14:43:04 +0300 Subject: [PATCH] v4.8.0 and v1.5.0 (#1021) * Update versions Add Ethereum to MacOS Fix Ethereum config when building Monero.com * Fix Restore from backup issue * Update app build versions Fix minor UI issue --- assets/text/Monerocom_Release_Notes.txt | 14 ++++--- assets/text/Release_Notes.txt | 16 +++---- ios/Podfile.lock | 14 ++++++- lib/di.dart | 4 +- lib/src/screens/dashboard/dashboard_page.dart | 42 +++++++++++-------- macos/Podfile.lock | 4 +- scripts/android/app_env.sh | 8 ++-- scripts/ios/app_env.sh | 8 ++-- scripts/macos/app_config.sh | 2 +- scripts/macos/app_env.sh | 4 +- tool/configure.dart | 6 +-- 11 files changed, 73 insertions(+), 49 deletions(-) diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index 6b5d8affe..403bb9f08 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,6 +1,8 @@ -Improved edit/delete for nodes and wallets -Wallets can now be renamed -Accessibility improvements -Improve Monero wallet rescan -Additional exchange assets: SHIB, AAVE, ARB, BAT, COMP, CRO, ENS, FTM, FRAX, GUSD, GTC, GRT, LDO, NEXO, CAKE, PEPE, STORJ, TUSD, WBTC, WETH, ZRX, DYDX, STETH -Cake Pay is temporarily removed, see https://cakelabs.com/news/cake-pay-mobile-to-shut-down/ \ No newline at end of file +Monero background syncing! See https://guides.cakewallet.com/docs/monero/#background-syncing +Cake 2FA access control settings! See https://guides.cakewallet.com/docs/advanced-features/authentication/#cake-2fa-presets-and-access-control-settings +Support Monero node proxy +UI improvements when sending to Address Book entry +Allow renaming Monero account names +Send templates now support multiple recipients (try using to make Monero change) +Onramper improvements +Scan node QR codes (for Umbrel) \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index 01e7da1cf..cedec7b7f 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,7 +1,9 @@ -Improved edit/delete for nodes and wallets -Wallets can now be renamed -Accessibility improvements -Bitcoin transaction bug fixes -Improve Monero wallet rescan -Additional exchange assets: SHIB, AAVE, ARB, BAT, COMP, CRO, ENS, FTM, FRAX, GUSD, GTC, GRT, LDO, NEXO, CAKE, PEPE, STORJ, TUSD, WBTC, WETH, ZRX, DYDX, STETH -Cake Pay is temporarily removed, see https://cakelabs.com/news/cake-pay-mobile-to-shut-down/ \ No newline at end of file +Ethereum! Store ETH and ERC-20 tokens +Monero background syncing! See https://guides.cakewallet.com/docs/monero/#background-syncing +Cake 2FA access control settings! See https://guides.cakewallet.com/docs/advanced-features/authentication/#cake-2fa-presets-and-access-control-settings +Support Monero node proxy +UI improvements when sending to Address Book entry +Allow renaming Monero/Haven account names +Send templates now support multiple recipients (try using to make Monero change) +Onramper improvements +Scan node QR codes (for Umbrel) \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 5c6ed30a6..f13c68629 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -134,6 +134,8 @@ PODS: - SDWebImage (5.16.0): - SDWebImage/Core (= 5.16.0) - SDWebImage/Core (5.16.0) + - sensitive_clipboard (0.0.1): + - Flutter - share_plus (0.0.1): - Flutter - shared_preferences_foundation (0.0.1): @@ -150,6 +152,8 @@ PODS: - Flutter - wakelock (0.0.1): - Flutter + - workmanager (0.0.1): + - Flutter DEPENDENCIES: - barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`) @@ -173,12 +177,14 @@ DEPENDENCIES: - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - platform_device_id (from `.symlinks/plugins/platform_device_id/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/ios`) - uni_links (from `.symlinks/plugins/uni_links/ios`) - UnstoppableDomainsResolution (~> 4.0.0) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - wakelock (from `.symlinks/plugins/wakelock/ios`) + - workmanager (from `.symlinks/plugins/workmanager/ios`) SPEC REPOS: https://github.com/CocoaPods/Specs.git: @@ -235,6 +241,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/permission_handler_apple/ios" platform_device_id: :path: ".symlinks/plugins/platform_device_id/ios" + sensitive_clipboard: + :path: ".symlinks/plugins/sensitive_clipboard/ios" share_plus: :path: ".symlinks/plugins/share_plus/ios" shared_preferences_foundation: @@ -245,6 +253,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/url_launcher_ios/ios" wakelock: :path: ".symlinks/plugins/wakelock/ios" + workmanager: + :path: ".symlinks/plugins/workmanager/ios" SPEC CHECKSUMS: barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0 @@ -270,11 +280,12 @@ SPEC CHECKSUMS: MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 - path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8 + path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 platform_device_id: 81b3e2993881f87d0c82ef151dc274df4869aef5 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 SDWebImage: 2aea163b50bfcb569a2726b6a754c54a4506fcf6 + sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986 share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 SwiftProtobuf: 40bd808372cb8706108f22d28f8ab4a6b9bc6989 @@ -283,6 +294,7 @@ SPEC CHECKSUMS: UnstoppableDomainsResolution: c3c67f4d0a5e2437cb00d4bd50c2e00d6e743841 url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f + workmanager: 0afdcf5628bbde6924c21af7836fed07b42e30e6 PODFILE CHECKSUM: 09df1114e7c360f55770d35a79356bf5446e0100 diff --git a/lib/di.dart b/lib/di.dart index e2108f26d..b02742e64 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -246,7 +246,9 @@ Future setup({ getIt.registerSingletonAsync(() => SharedPreferences.getInstance()); } - getIt.registerFactory(() => BackgroundTasks()); + if (!_isSetupFinished) { + getIt.registerFactory(() => BackgroundTasks()); + } final isBitcoinBuyEnabled = (secrets.wyreSecretKey.isNotEmpty) && (secrets.wyreApiKey.isNotEmpty) && diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index 0c46aaf25..56b778e08 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -298,24 +298,7 @@ class _DashboardPageView extends BasePage { } }); - final sharedPrefs = await SharedPreferences.getInstance(); - final currentAppVersion = - VersionComparator.getExtendedVersionNumber(dashboardViewModel.settingsStore.appVersion); - final lastSeenAppVersion = sharedPrefs.getInt(PreferencesKey.lastSeenAppVersion); - final isNewInstall = sharedPrefs.getBool(PreferencesKey.isNewInstall); - - if (currentAppVersion != lastSeenAppVersion && !isNewInstall!) { - await Future.delayed(Duration(seconds: 1)); - await showPopUp( - context: context, - builder: (BuildContext context) { - return ReleaseNotesScreen( - title: 'Version ${dashboardViewModel.settingsStore.appVersion}'); - }); - sharedPrefs.setInt(PreferencesKey.lastSeenAppVersion, currentAppVersion); - } else if (isNewInstall!) { - sharedPrefs.setInt(PreferencesKey.lastSeenAppVersion, currentAppVersion); - } + _showReleaseNotesPopup(context); var needToPresentYat = false; var isInactive = false; @@ -341,4 +324,27 @@ class _DashboardPageView extends BasePage { needToPresentYat = true; }); } + + void _showReleaseNotesPopup(BuildContext context) async { + final sharedPrefs = await SharedPreferences.getInstance(); + final currentAppVersion = + VersionComparator.getExtendedVersionNumber(dashboardViewModel.settingsStore.appVersion); + final lastSeenAppVersion = sharedPrefs.getInt(PreferencesKey.lastSeenAppVersion); + final isNewInstall = sharedPrefs.getBool(PreferencesKey.isNewInstall); + + if (currentAppVersion != lastSeenAppVersion && !isNewInstall!) { + Future.delayed(Duration(seconds: 1), () { + showPopUp( + context: context, + builder: (BuildContext context) { + return ReleaseNotesScreen( + title: 'Version ${dashboardViewModel.settingsStore.appVersion}'); + }); + }); + + sharedPrefs.setInt(PreferencesKey.lastSeenAppVersion, currentAppVersion); + } else if (isNewInstall!) { + sharedPrefs.setInt(PreferencesKey.lastSeenAppVersion, currentAppVersion); + } + } } diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 2ccdc183c..6657ec4dc 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -110,13 +110,13 @@ SPEC CHECKSUMS: FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0 package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2 - path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8 + path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 platform_device_id: 3e414428f45df149bbbfb623e2c0ca27c545b763 platform_device_id_macos: f763bb55f088be804d61b96eb4710b8ab6598e94 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 - url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451 + url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95 wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9 PODFILE CHECKSUM: 5107934592df7813b33d744aebc8ddc6b5a5445f diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index e90d26406..75f3bbd06 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -14,14 +14,14 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.4.0" -MONERO_COM_BUILD_NUMBER=52 +MONERO_COM_VERSION="1.5.0" +MONERO_COM_BUILD_NUMBER=54 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.7.0" -CAKEWALLET_BUILD_NUMBER=162 +CAKEWALLET_VERSION="4.8.0" +CAKEWALLET_BUILD_NUMBER=167 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" diff --git a/scripts/ios/app_env.sh b/scripts/ios/app_env.sh index 52cb07183..68d3f69a8 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.4.0" -MONERO_COM_BUILD_NUMBER=50 +MONERO_COM_VERSION="1.5.0" +MONERO_COM_BUILD_NUMBER=52 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.7.0" -CAKEWALLET_BUILD_NUMBER=165 +CAKEWALLET_VERSION="4.8.0" +CAKEWALLET_BUILD_NUMBER=175 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/macos/app_config.sh b/scripts/macos/app_config.sh index 231945659..8c05035c7 100755 --- a/scripts/macos/app_config.sh +++ b/scripts/macos/app_config.sh @@ -23,7 +23,7 @@ CONFIG_ARGS="" case $APP_MACOS_TYPE in $CAKEWALLET) - CONFIG_ARGS="--monero --bitcoin";; #--haven + CONFIG_ARGS="--monero --bitcoin --ethereum";; #--haven esac cp -rf pubspec_description.yaml pubspec.yaml diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index b31a5a973..387bd39c5 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -15,8 +15,8 @@ if [ -n "$1" ]; then fi CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.0.7" -CAKEWALLET_BUILD_NUMBER=26 +CAKEWALLET_VERSION="1.1.0" +CAKEWALLET_BUILD_NUMBER=28 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then diff --git a/tool/configure.dart b/tool/configure.dart index 8a93feab5..3d846e8a6 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -477,8 +477,6 @@ Future generateEthereum(bool hasImplementation) async { final outputFile = File(ethereumOutputPath); const ethereumCommonHeaders = """ -"""; - const ethereumCWHeaders = """ import 'package:cake_wallet/view_model/send/output.dart'; import 'package:cw_core/crypto_amount_format.dart'; import 'package:cw_core/crypto_currency.dart'; @@ -490,6 +488,9 @@ import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/wallet_credentials.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_service.dart'; +import 'package:hive/hive.dart'; +"""; + const ethereumCWHeaders = """ import 'package:cw_ethereum/ethereum_formatter.dart'; import 'package:cw_ethereum/ethereum_mnemonics.dart'; import 'package:cw_ethereum/ethereum_transaction_credentials.dart'; @@ -498,7 +499,6 @@ import 'package:cw_ethereum/ethereum_wallet.dart'; import 'package:cw_ethereum/ethereum_wallet_creation_credentials.dart'; import 'package:cw_ethereum/ethereum_wallet_service.dart'; import 'package:cw_ethereum/ethereum_transaction_priority.dart'; -import 'package:hive/hive.dart'; """; const ethereumCwPart = "part 'cw_ethereum.dart';"; const ethereumContent = """