From 827a13f0236e1aad8710142674d084342e5146c1 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 28 Oct 2026 10:20:01 -0500 Subject: [PATCH] Let ETH nodes choose Tor or clearnet The Tor/clearnet radios were hidden for Ethereum in d87af969d because web3dart could not be proxied at the time. Now that getEthClient honours the node's tor/clearnet flags and throws on a mismatch, a node stored as Tor-only or clearnet-only (older nodes, restored backups) could not be fixed from the node settings the error points the user to. Show the radios for ETH like every other coin. --- .../add_edit_node_view.dart | 105 +++++++++--------- 1 file changed, 51 insertions(+), 54 deletions(-) diff --git a/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart b/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart index e120960d1..2d6645f64 100644 --- a/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart +++ b/lib/pages/settings_views/global_settings_view/manage_nodes_views/add_edit_node_view.dart @@ -1475,60 +1475,57 @@ class _NodeFormState extends ConsumerState { ), ], ), - if (widget.coin is! Ethereum) const SizedBox(height: 16), - if (widget.coin is! Ethereum) - Row( - children: [ - RadioTextButton( - label: "Only TOR traffic", - enabled: !widget.readOnly, - value: TorPlainNetworkOption.tor, - groupValue: netOption, - onChanged: (value) { - if (!widget.readOnly) { - setState(() => netOption = TorPlainNetworkOption.tor); - _updateState(); - } - }, - ), - ], - ), - if (widget.coin is! Ethereum) const SizedBox(height: 8), - if (widget.coin is! Ethereum) - Row( - children: [ - RadioTextButton( - label: "Only non-TOR traffic", - enabled: !widget.readOnly, - value: TorPlainNetworkOption.clear, - groupValue: netOption, - onChanged: (value) { - if (!widget.readOnly) { - setState(() => netOption = TorPlainNetworkOption.clear); - _updateState(); - } - }, - ), - ], - ), - if (widget.coin is! Ethereum) const SizedBox(height: 8), - if (widget.coin is! Ethereum) - Row( - children: [ - RadioTextButton( - label: "Allow both", - enabled: !widget.readOnly, - value: TorPlainNetworkOption.both, - groupValue: netOption, - onChanged: (value) { - if (!widget.readOnly) { - setState(() => netOption = TorPlainNetworkOption.both); - _updateState(); - } - }, - ), - ], - ), + const SizedBox(height: 16), + Row( + children: [ + RadioTextButton( + label: "Only TOR traffic", + enabled: !widget.readOnly, + value: TorPlainNetworkOption.tor, + groupValue: netOption, + onChanged: (value) { + if (!widget.readOnly) { + setState(() => netOption = TorPlainNetworkOption.tor); + _updateState(); + } + }, + ), + ], + ), + const SizedBox(height: 8), + Row( + children: [ + RadioTextButton( + label: "Only non-TOR traffic", + enabled: !widget.readOnly, + value: TorPlainNetworkOption.clear, + groupValue: netOption, + onChanged: (value) { + if (!widget.readOnly) { + setState(() => netOption = TorPlainNetworkOption.clear); + _updateState(); + } + }, + ), + ], + ), + const SizedBox(height: 8), + Row( + children: [ + RadioTextButton( + label: "Allow both", + enabled: !widget.readOnly, + value: TorPlainNetworkOption.both, + groupValue: netOption, + onChanged: (value) { + if (!widget.readOnly) { + setState(() => netOption = TorPlainNetworkOption.both); + _updateState(); + } + }, + ), + ], + ), if (widget.coin is CryptonoteCurrency && _isLocalNode()) const SizedBox(height: 8), if (widget.coin is CryptonoteCurrency && _isLocalNode())