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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 61 additions and 57 deletions

View file

@ -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<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]);