Skip to content

Commit

Permalink
V4.11.0 v1.8.0 (#1216)
Browse files Browse the repository at this point in the history
* 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]
  • Loading branch information
OmarHatem28 authored Dec 5, 2023
1 parent 3c28e25 commit b95af3a
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 57 deletions.
4 changes: 2 additions & 2 deletions assets/text/Monerocom_Release_Notes.txt
Original file line number Diff line number Diff line change
@@ -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
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
6 changes: 3 additions & 3 deletions assets/text/Release_Notes.txt
Original file line number Diff line number Diff line change
@@ -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
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
1 change: 1 addition & 0 deletions configure_cake_wallet_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 7 additions & 4 deletions cw_core/lib/node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -214,14 +214,17 @@ class Node extends HiveObject with Keyable {
}

Future<bool> 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]);
Expand Down
8 changes: 4 additions & 4 deletions cw_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
66 changes: 33 additions & 33 deletions lib/src/screens/settings/tor_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -40,44 +40,44 @@ class _TorPageBodyState extends State<TorPageBody> {
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<void> 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() {
Expand Down
8 changes: 4 additions & 4 deletions pubspec_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions scripts/android/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/android/pubspec_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions scripts/ios/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/macos/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tool/configure.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 = """
Expand Down

0 comments on commit b95af3a

Please sign in to comment.