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]
This commit is contained in:
Omar Hatem
2023-12-05 02:35:33 +02:00
committed by GitHub
parent 3c28e25259
commit b95af3a649
12 changed files with 61 additions and 57 deletions
+33 -33
View File
@@ -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<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() {