From b95af3a649fc4f28701f6d8dd173921a95b95d10 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Tue, 5 Dec 2023 02:35:33 +0200 Subject: [PATCH] V4.11.0 v1.8.0 (#1216) * V4.11.0 and v1.8.0 * Add polygon to iOS and macOS Minor import fix for monero.com * Remove Polygon temporarily * Remove tor temorarily [skip ci] * Remove tor temorarily [skip ci] --- assets/text/Monerocom_Release_Notes.txt | 4 +- assets/text/Release_Notes.txt | 6 +-- configure_cake_wallet_android.sh | 1 + cw_core/lib/node.dart | 11 +++-- cw_core/pubspec.yaml | 8 +-- lib/src/screens/settings/tor_page.dart | 66 ++++++++++++------------- pubspec_base.yaml | 8 +-- scripts/android/app_env.sh | 4 +- scripts/android/pubspec_gen.sh | 2 +- scripts/ios/app_env.sh | 4 +- scripts/macos/app_env.sh | 2 +- tool/configure.dart | 2 +- 12 files changed, 61 insertions(+), 57 deletions(-) diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index 2830ecdd8..90be3b8e8 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,2 +1,2 @@ -Monero Polyseed support, under Advanced privacy settings, create and restore from a 16 words phrase and without the need to remember the wallet creation date -Minor bug fixes and enhancements \ No newline at end of file +Monero Polyseed support, create and restore from a 16 words phrase and without the need to remember the wallet creation date +Bug fixes and enhancements \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index accdbb080..655d59a7d 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,3 +1,3 @@ -Monero Polyseed support, under Advanced privacy settings, create and restore from a 16 words phrase and without the need to remember the wallet creation date -Add Ethereum NFTs tab to see all of your purchased NFTs -Minor bug fixes and enhancements \ No newline at end of file +Monero Polyseed support, create and restore from a 16 words phrase and without the need to remember the wallet creation date +Add NFTs tab to see all of your purchased NFTs on Ethereum +Bug fixes and enhancements \ No newline at end of file diff --git a/configure_cake_wallet_android.sh b/configure_cake_wallet_android.sh index 6998555d5..da794a35c 100755 --- a/configure_cake_wallet_android.sh +++ b/configure_cake_wallet_android.sh @@ -10,4 +10,5 @@ cd cw_haven && flutter pub get && flutter packages pub run build_runner build -- cd cw_ethereum && flutter pub get && flutter packages pub run build_runner build --delete-conflicting-outputs && cd .. cd cw_nano && flutter pub get && flutter packages pub run build_runner build --delete-conflicting-outputs && cd .. cd cw_bitcoin_cash && flutter pub get && flutter packages pub run build_runner build --delete-conflicting-outputs && cd .. +cd cw_polygon && flutter pub get && flutter packages pub run build_runner build --delete-conflicting-outputs && cd .. flutter packages pub run build_runner build --delete-conflicting-outputs diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index cc749f23a..bd96e1395 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -6,7 +6,7 @@ import 'package:hive/hive.dart'; import 'package:cw_core/hive_type_ids.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:http/io_client.dart' as ioc; -import 'package:tor/tor.dart'; +// import 'package:tor/tor.dart'; part 'node.g.dart'; @@ -214,14 +214,17 @@ class Node extends HiveObject with Keyable { } Future requestNodeWithProxy() async { - if (!isValidProxyAddress && !Tor.instance.enabled) { + if (!isValidProxyAddress/* && !Tor.instance.enabled*/) { return false; } String? proxy = socksProxyAddress; - if ((proxy?.isEmpty ?? true) && Tor.instance.enabled) { - proxy = "${InternetAddress.loopbackIPv4.address}:${Tor.instance.port}"; + // if ((proxy?.isEmpty ?? true) && Tor.instance.enabled) { + // proxy = "${InternetAddress.loopbackIPv4.address}:${Tor.instance.port}"; + // } + if (proxy == null) { + return false; } final proxyAddress = proxy!.split(':')[0]; final proxyPort = int.parse(proxy.split(':')[1]); diff --git a/cw_core/pubspec.yaml b/cw_core/pubspec.yaml index 533b578ad..04a840d4e 100644 --- a/cw_core/pubspec.yaml +++ b/cw_core/pubspec.yaml @@ -20,10 +20,10 @@ dependencies: intl: ^0.18.0 encrypt: ^5.0.1 socks5_proxy: ^1.0.4 - tor: - git: - url: https://github.com/cake-tech/tor.git - ref: main +# tor: +# git: +# url: https://github.com/cake-tech/tor.git +# ref: main dev_dependencies: flutter_test: diff --git a/lib/src/screens/settings/tor_page.dart b/lib/src/screens/settings/tor_page.dart index d1d5c7e83..ae1ef1677 100644 --- a/lib/src/screens/settings/tor_page.dart +++ b/lib/src/screens/settings/tor_page.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/store/app_store.dart'; import 'package:flutter/material.dart'; -import 'package:tor/tor.dart'; +// import 'package:tor/tor.dart'; class TorPage extends BasePage { final AppStore appStore; @@ -40,44 +40,44 @@ class _TorPageBodyState extends State { connecting = true; // Update flag }); - await Tor.init(); - - // Start the proxy - await Tor.instance.start(); - - // Toggle started flag. - setState(() { - torEnabled = Tor.instance.enabled; // Update flag - connecting = false; - }); - - final node = widget.appStore.settingsStore.getCurrentNode(widget.appStore.wallet!.type); - if (node.socksProxyAddress?.isEmpty ?? true) { - node.socksProxyAddress = "${InternetAddress.loopbackIPv4.address}:${Tor.instance.port}"; - } - widget.appStore.wallet!.connectToNode(node: node); + // await Tor.init(); + // + // // Start the proxy + // await Tor.instance.start(); + // + // // Toggle started flag. + // setState(() { + // torEnabled = Tor.instance.enabled; // Update flag + // connecting = false; + // }); + // + // final node = widget.appStore.settingsStore.getCurrentNode(widget.appStore.wallet!.type); + // if (node.socksProxyAddress?.isEmpty ?? true) { + // node.socksProxyAddress = "${InternetAddress.loopbackIPv4.address}:${Tor.instance.port}"; + // } + // widget.appStore.wallet!.connectToNode(node: node); print('Done awaiting; tor should be running'); } Future endTor() async { - // Start the proxy - Tor.instance.disable(); - - // Toggle started flag. - setState(() { - torEnabled = Tor.instance.enabled; // Update flag - }); - - print('Done awaiting; tor should be stopped'); - } - - @override - void initState() { - super.initState(); - - torEnabled = Tor.instance.enabled; + // // Start the proxy + // Tor.instance.disable(); + // + // // Toggle started flag. + // setState(() { + // torEnabled = Tor.instance.enabled; // Update flag + // }); + // + // print('Done awaiting; tor should be stopped'); } + // + // @override + // void initState() { + // super.initState(); + // + // torEnabled = Tor.instance.enabled; + // } @override void dispose() { diff --git a/pubspec_base.yaml b/pubspec_base.yaml index d0a295047..a4738bf82 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -98,10 +98,10 @@ dependencies: url: https://github.com/cake-tech/bitcoin_flutter.git ref: cake-update-v3 fluttertoast: 8.1.4 - tor: - git: - url: https://github.com/cake-tech/tor.git - ref: main +# tor: +# git: +# url: https://github.com/cake-tech/tor.git +# ref: main socks5_proxy: ^1.0.4 flutter_svg: ^2.0.9 polyseed: diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index d241c4421..63a29221b 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -16,14 +16,14 @@ APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.8.0" -MONERO_COM_BUILD_NUMBER=68 +MONERO_COM_BUILD_NUMBER=69 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.11.0" -CAKEWALLET_BUILD_NUMBER=182 +CAKEWALLET_BUILD_NUMBER=184 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" CAKEWALLET_SCHEME="cakewallet" diff --git a/scripts/android/pubspec_gen.sh b/scripts/android/pubspec_gen.sh index 0277922d3..dd9852072 100755 --- a/scripts/android/pubspec_gen.sh +++ b/scripts/android/pubspec_gen.sh @@ -10,7 +10,7 @@ case $APP_ANDROID_TYPE in CONFIG_ARGS="--monero" ;; $CAKEWALLET) - CONFIG_ARGS="--monero --bitcoin --haven --ethereum --nano --bitcoinCash --polygon" + CONFIG_ARGS="--monero --bitcoin --haven --ethereum --nano --bitcoinCash" ;; $HAVEN) CONFIG_ARGS="--haven" diff --git a/scripts/ios/app_env.sh b/scripts/ios/app_env.sh index 874501cb5..a831396f1 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -14,12 +14,12 @@ APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.8.0" -MONERO_COM_BUILD_NUMBER=66 +MONERO_COM_BUILD_NUMBER=67 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.11.0" -CAKEWALLET_BUILD_NUMBER=200 +CAKEWALLET_BUILD_NUMBER=202 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index f69670c9a..f6fa8b5e8 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -16,7 +16,7 @@ fi CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="1.4.0" -CAKEWALLET_BUILD_NUMBER=43 +CAKEWALLET_BUILD_NUMBER=45 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then diff --git a/tool/configure.dart b/tool/configure.dart index e3efb3275..67732faa9 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -590,7 +590,6 @@ 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:cw_ethereum/ethereum_mnemonics.dart'; import 'package:eth_sig_util/util/utils.dart'; import 'package:hive/hive.dart'; import 'package:web3dart/web3dart.dart'; @@ -603,6 +602,7 @@ import 'package:cw_polygon/polygon_wallet.dart'; import 'package:cw_polygon/polygon_wallet_creation_credentials.dart'; import 'package:cw_polygon/polygon_wallet_service.dart'; import 'package:cw_polygon/polygon_transaction_priority.dart'; +import 'package:cw_ethereum/ethereum_mnemonics.dart'; """; const polygonCwPart = "part 'cw_polygon.dart';"; const polygonContent = """