diff --git a/assets/solana_node_list.yml b/assets/solana_node_list.yml index 4a2e12161..e3ff9138e 100644 --- a/assets/solana_node_list.yml +++ b/assets/solana_node_list.yml @@ -1,4 +1,7 @@ - uri: rpc.ankr.com is_default: true + useSSL: true +- + uri: api.mainnet-beta.solana.com:443 useSSL: true \ No newline at end of file diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index c90d54524..11a3ad803 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,4 +1,3 @@ -Monero synchronization improvements -Enhance error handling -UI enhancements +Scan and verify messages +Synchronization enhancements Bug fixes \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index 34bca2e5e..11a3ad803 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,6 +1,3 @@ -Wallets enhancements -Monero synchronization improvements -Improve wallet backups -Enhance error handling -UI enhancements +Scan and verify messages +Synchronization enhancements Bug fixes \ No newline at end of file diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index b8d9adb14..2d0b989d7 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -264,7 +264,8 @@ abstract class ElectrumWalletBase void Function(FlutterErrorDetails)? _onError; Timer? _reconnectTimer; Timer? _autoSaveTimer; - static const int _autoSaveInterval = 30; + Timer? _updateFeeRateTimer; + static const int _autoSaveInterval = 1; Future init() async { await walletAddresses.init(); @@ -272,7 +273,7 @@ abstract class ElectrumWalletBase await save(); _autoSaveTimer = - Timer.periodic(Duration(seconds: _autoSaveInterval), (_) async => await save()); + Timer.periodic(Duration(minutes: _autoSaveInterval), (_) async => await save()); } @action @@ -425,6 +426,10 @@ abstract class ElectrumWalletBase await updateTransactions(); await updateAllUnspents(); await updateBalance(); + updateFeeRates(); + + _updateFeeRateTimer ??= + Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates()); if (alwaysScan == true) { _setListeners(walletInfo.restoreHeight); @@ -1213,6 +1218,7 @@ abstract class ElectrumWalletBase await electrumClient.close(); } catch (_) {} _autoSaveTimer?.cancel(); + _updateFeeRateTimer?.cancel(); } @action @@ -1371,7 +1377,7 @@ abstract class ElectrumWalletBase if (confirmations > 0) return false; - if (transactionHex == null) { + if (transactionHex == null || transactionHex.isEmpty) { return false; } diff --git a/cw_evm/lib/evm_chain_wallet.dart b/cw_evm/lib/evm_chain_wallet.dart index bbf972f0d..0ade2215e 100644 --- a/cw_evm/lib/evm_chain_wallet.dart +++ b/cw_evm/lib/evm_chain_wallet.dart @@ -113,6 +113,8 @@ abstract class EVMChainWalletBase int? gasBaseFee = 0; int estimatedGasUnits = 0; + Timer? _updateFeesTimer; + bool _isTransactionUpdating; // TODO: remove after integrating our own node and having eth_newPendingTransactionFilter @@ -263,6 +265,7 @@ abstract class EVMChainWalletBase void close() { _client.stop(); _transactionsUpdateTimer?.cancel(); + _updateFeesTimer?.cancel(); } @action @@ -297,7 +300,7 @@ abstract class EVMChainWalletBase await _updateEstimatedGasFeeParams(); - Timer.periodic(const Duration(seconds: 10), (timer) async { + _updateFeesTimer ??= Timer.periodic(const Duration(seconds: 30), (timer) async { await _updateEstimatedGasFeeParams(); }); diff --git a/cw_monero/lib/monero_wallet_service.dart b/cw_monero/lib/monero_wallet_service.dart index d771d1815..f9973f430 100644 --- a/cw_monero/lib/monero_wallet_service.dart +++ b/cw_monero/lib/monero_wallet_service.dart @@ -119,7 +119,7 @@ class MoneroWalletService extends WalletService< } @override - Future openWallet(String name, String password) async { + Future openWallet(String name, String password, {bool? retryOnFailure}) async { MoneroWallet? wallet; try { final path = await pathForWallet(name: name, type: getType()); @@ -181,12 +181,12 @@ class MoneroWalletService extends WalletService< wallet.onError != null) { wallet.onError!(FlutterErrorDetails(exception: e, stack: s)); } - if (invalidPassword) { + if (invalidPassword || retryOnFailure == false) { rethrow; } await restoreOrResetWalletFiles(name); - return openWallet(name, password); + return openWallet(name, password, retryOnFailure: false); } } diff --git a/cw_monero/pubspec.lock b/cw_monero/pubspec.lock index 51efd4076..13c70cfad 100644 --- a/cw_monero/pubspec.lock +++ b/cw_monero/pubspec.lock @@ -295,10 +295,10 @@ packages: dependency: transitive description: name: hashlib - sha256: "5037d3b8c36384c03a728543ae67d962a56970c5432a50862279fe68ee4c8411" + sha256: d41795742c10947930630118c6836608deeb9047cd05aee32d2baeb697afd66a url: "https://pub.dev" source: hosted - version: "1.19.1" + version: "1.19.2" hashlib_codecs: dependency: transitive description: @@ -575,12 +575,11 @@ packages: polyseed: dependency: "direct main" description: - path: "." - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f - resolved-ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f - url: "https://github.com/mrcyjanek/polyseed_dart" - source: git - version: "0.0.5" + name: polyseed + sha256: "11d4dbee409db053c5e9cd77382b2f5115f43fc2529158a826a96f3ba505d770" + url: "https://pub.dev" + source: hosted + version: "0.0.6" pool: dependency: transitive description: diff --git a/cw_monero/pubspec.yaml b/cw_monero/pubspec.yaml index 7f5da2621..3053977de 100644 --- a/cw_monero/pubspec.yaml +++ b/cw_monero/pubspec.yaml @@ -19,10 +19,7 @@ dependencies: flutter_mobx: ^2.0.6+1 intl: ^0.18.0 encrypt: ^5.0.1 - polyseed: - git: - url: https://github.com/mrcyjanek/polyseed_dart - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + polyseed: ^0.0.6 cw_core: path: ../cw_core monero: diff --git a/cw_wownero/pubspec.lock b/cw_wownero/pubspec.lock index f164b3086..58831085f 100644 --- a/cw_wownero/pubspec.lock +++ b/cw_wownero/pubspec.lock @@ -295,18 +295,18 @@ packages: dependency: transitive description: name: hashlib - sha256: "71bf102329ddb8e50c8a995ee4645ae7f1728bb65e575c17196b4d8262121a96" + sha256: d41795742c10947930630118c6836608deeb9047cd05aee32d2baeb697afd66a url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.19.2" hashlib_codecs: dependency: transitive description: name: hashlib_codecs - sha256: "49e2a471f74b15f1854263e58c2ac11f2b631b5b12c836f9708a35397d36d626" + sha256: "2b570061f5a4b378425be28a576c1e11783450355ad4345a19f606ff3d96db0f" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.5.0" hive: dependency: transitive description: @@ -567,12 +567,11 @@ packages: polyseed: dependency: "direct main" description: - path: "." - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f - resolved-ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f - url: "https://github.com/mrcyjanek/polyseed_dart" - source: git - version: "0.0.5" + name: polyseed + sha256: "11d4dbee409db053c5e9cd77382b2f5115f43fc2529158a826a96f3ba505d770" + url: "https://pub.dev" + source: hosted + version: "0.0.6" pool: dependency: transitive description: diff --git a/cw_wownero/pubspec.yaml b/cw_wownero/pubspec.yaml index eb14286a9..b9306711d 100644 --- a/cw_wownero/pubspec.yaml +++ b/cw_wownero/pubspec.yaml @@ -19,10 +19,7 @@ dependencies: flutter_mobx: ^2.0.6+1 intl: ^0.18.0 encrypt: ^5.0.1 - polyseed: - git: - url: https://github.com/mrcyjanek/polyseed_dart - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + polyseed: ^0.0.6 cw_core: path: ../cw_core monero: diff --git a/lib/core/wallet_loading_service.dart b/lib/core/wallet_loading_service.dart index 2b570f14c..0087b1332 100644 --- a/lib/core/wallet_loading_service.dart +++ b/lib/core/wallet_loading_service.dart @@ -60,7 +60,9 @@ class WalletLoadingService { String corruptedWalletsSeeds = "Corrupted wallets seeds (if retrievable, empty otherwise):"; try { corruptedWalletsSeeds += await _getCorruptedWalletSeeds(name, type); - } catch (_) {} + } catch (e) { + corruptedWalletsSeeds += "\nFailed to fetch $name seeds: $e"; + } // try opening another wallet that is not corrupted to give user access to the app final walletInfoSource = await CakeHive.openBox(WalletInfo.boxName); @@ -90,7 +92,9 @@ class WalletLoadingService { if (!corruptedWalletsSeeds.contains(seeds)) { corruptedWalletsSeeds += seeds; } - } catch (_) {} + } catch (e) { + corruptedWalletsSeeds += "\nFailed to fetch $name seeds: $e"; + } } } diff --git a/lib/reactions/bootstrap.dart b/lib/reactions/bootstrap.dart index 5b1a0ace7..bf045c0dd 100644 --- a/lib/reactions/bootstrap.dart +++ b/lib/reactions/bootstrap.dart @@ -27,7 +27,7 @@ Future bootstrap(GlobalKey navigatorKey) async { authenticationStore.installed(); } - await startAuthenticationStateChange(authenticationStore, navigatorKey); + startAuthenticationStateChange(authenticationStore, navigatorKey); startCurrentWalletChangeReaction(appStore, settingsStore, fiatConversionStore); startCurrentFiatChangeReaction(appStore, settingsStore, fiatConversionStore); startCurrentFiatApiModeChangeReaction(appStore, settingsStore, fiatConversionStore); diff --git a/lib/reactions/on_authentication_state_change.dart b/lib/reactions/on_authentication_state_change.dart index 014306b98..1aa0a12c6 100644 --- a/lib/reactions/on_authentication_state_change.dart +++ b/lib/reactions/on_authentication_state_change.dart @@ -7,26 +7,17 @@ import 'package:flutter/widgets.dart'; import 'package:mobx/mobx.dart'; import 'package:cake_wallet/entities/load_current_wallet.dart'; import 'package:cake_wallet/store/authentication_store.dart'; +import 'package:rxdart/subjects.dart'; ReactionDisposer? _onAuthenticationStateChange; dynamic loginError; -StreamController authenticatedErrorStreamController = StreamController(); +StreamController authenticatedErrorStreamController = BehaviorSubject(); -Future reInitializeStreamController() async { - if (!authenticatedErrorStreamController.isClosed) { - await authenticatedErrorStreamController.close(); - } - - authenticatedErrorStreamController = StreamController(); -} - -Future startAuthenticationStateChange( +void startAuthenticationStateChange( AuthenticationStore authenticationStore, GlobalKey navigatorKey, -) async { - await reInitializeStreamController(); - +) { authenticatedErrorStreamController.stream.listen((event) { if (authenticationStore.state == AuthenticationState.allowed) { ExceptionHandler.showError(event.toString(), delayInSeconds: 3); diff --git a/lib/src/screens/dashboard/pages/balance_page.dart b/lib/src/screens/dashboard/pages/balance_page.dart index 770cda6f9..57f908986 100644 --- a/lib/src/screens/dashboard/pages/balance_page.dart +++ b/lib/src/screens/dashboard/pages/balance_page.dart @@ -287,8 +287,8 @@ class CryptoBalanceWidget extends StatelessWidget { padding: const EdgeInsets.fromLTRB(16, 0, 16, 8), child: DashBoardRoundedCardWidget( customBorder: 30, - title: "Monero wallet is broken", - subTitle: "Here are the things that are broken:\n - " + title: "This wallet has encountered an issue", + subTitle: "Here are the things that you should note:\n - " +dashboardViewModel.isMoneroWalletBrokenReasons.join("\n - ") +"\n\nPlease restart your wallet and if it doesn't help contact our support.", onTap: () {}, diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 56a0e061b..d58d7535c 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -32,7 +32,6 @@ import 'package:cake_wallet/view_model/dashboard/trade_list_item.dart'; import 'package:cake_wallet/view_model/dashboard/transaction_list_item.dart'; import 'package:cake_wallet/view_model/settings/sync_mode.dart'; import 'package:cake_wallet/wallet_type_utils.dart'; -import 'package:cake_wallet/wownero/wownero.dart' as wow; import 'package:cryptography/cryptography.dart'; import 'package:cw_core/balance.dart'; import 'package:cw_core/cake_hive.dart'; @@ -485,6 +484,9 @@ abstract class DashboardViewModelBase with Store { @computed bool get hasSignMessages { + if (wallet.isHardwareWallet) { + return false; + } switch (wallet.type) { case WalletType.monero: case WalletType.litecoin: diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index 3e45e8ba1..f2ea8eeb4 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -142,8 +142,17 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with _bestRate = 0; _calculateBestRate(); }); + + if (isElectrumWallet) { + bitcoin!.updateFeeRates(wallet); + } } + bool get isElectrumWallet => + wallet.type == WalletType.bitcoin || + wallet.type == WalletType.litecoin || + wallet.type == WalletType.bitcoinCash; + bool _useTorOnly; final Box trades; final ExchangeTemplateStore _exchangeTemplateStore; diff --git a/macos/Podfile.lock b/macos/Podfile.lock index c2f37a3f3..8951a2dd1 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -17,15 +17,13 @@ PODS: - in_app_review (0.2.0): - FlutterMacOS - OrderedSet (5.0.0) - - package_info (0.0.1): - - FlutterMacOS - package_info_plus (0.0.1): - FlutterMacOS - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - ReachabilitySwift (5.0.0) - - share_plus_macos (0.0.1): + - share_plus (0.0.1): - FlutterMacOS - shared_preferences_foundation (0.0.1): - Flutter @@ -46,10 +44,9 @@ DEPENDENCIES: - 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`) - - package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - - share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`) + - share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`) - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - sp_scanner (from `Flutter/ephemeral/.symlinks/plugins/sp_scanner/macos`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) @@ -77,14 +74,12 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral in_app_review: :path: Flutter/ephemeral/.symlinks/plugins/in_app_review/macos - package_info: - :path: Flutter/ephemeral/.symlinks/plugins/package_info/macos package_info_plus: :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos path_provider_foundation: :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin - share_plus_macos: - :path: Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos + share_plus: + :path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos shared_preferences_foundation: :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin sp_scanner: @@ -104,11 +99,10 @@ SPEC CHECKSUMS: FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0 OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c - package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2 - package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce + package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 - share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4 + share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 sp_scanner: 269d96e0ec3173e69156be7239b95182be3b8303 url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399 diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 07dc7f5af..0d99c1c8c 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -94,10 +94,7 @@ dependencies: # ref: main socks5_proxy: ^1.0.4 flutter_svg: ^2.0.9 - polyseed: - git: - url: https://github.com/mrcyjanek/polyseed_dart - ref: f9adc68dbf879fefadeae8e86d1c2983f5a2cc3f + polyseed: ^0.0.6 nostr_tools: ^1.0.9 solana: ^0.30.1 bitcoin_base: @@ -105,7 +102,7 @@ dependencies: url: https://github.com/cake-tech/bitcoin_base ref: cake-update-v5 ledger_flutter: ^1.0.1 - hashlib: 1.12.0 + hashlib: ^1.19.2 dev_dependencies: flutter_test: diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index c91f24622..324d2d2ae 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -15,15 +15,15 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.16.3" -MONERO_COM_BUILD_NUMBER=97 +MONERO_COM_VERSION="1.16.4" +MONERO_COM_BUILD_NUMBER=98 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.19.3" -CAKEWALLET_BUILD_NUMBER=224 +CAKEWALLET_VERSION="4.19.4" +CAKEWALLET_BUILD_NUMBER=225 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 e32b3e9f3..1405f7939 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.16.3" -MONERO_COM_BUILD_NUMBER=95 +MONERO_COM_VERSION="1.16.4" +MONERO_COM_BUILD_NUMBER=96 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.19.3" -CAKEWALLET_BUILD_NUMBER=262 +CAKEWALLET_VERSION="4.19.4" +CAKEWALLET_BUILD_NUMBER=263 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/linux/app_env.sh b/scripts/linux/app_env.sh index 729cf376b..bc2965193 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="1.9.2" -CAKEWALLET_BUILD_NUMBER=30 +CAKEWALLET_VERSION="1.9.4" +CAKEWALLET_BUILD_NUMBER=31 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 2f6d51a93..9487be2c8 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="1.6.2" -MONERO_COM_BUILD_NUMBER=27 +MONERO_COM_VERSION="1.6.4" +MONERO_COM_BUILD_NUMBER=28 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.12.2" -CAKEWALLET_BUILD_NUMBER=83 +CAKEWALLET_VERSION="1.12.4" +CAKEWALLET_BUILD_NUMBER=84 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 216f367ca..4d7838723 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 "0.0.4" +#define MyAppVersion "0.0.5" #define MyAppPublisher "Cake Labs LLC" #define MyAppURL "https://cakewallet.com/" #define MyAppExeName "CakeWallet.exe"