diff --git a/lib/db/db_version_migration.dart b/lib/db/db_version_migration.dart index 606996a7f..fcf632669 100644 --- a/lib/db/db_version_migration.dart +++ b/lib/db/db_version_migration.dart @@ -78,7 +78,7 @@ class DbVersionMigrator with WalletDB { id: e.id, useSSL: e.useSSL, torEnabled: e.torEnabled, - clearEnabled: e.plainEnabled, + clearnetEnabled: e.clearnetEnabled, ), ) .toList(); @@ -91,7 +91,7 @@ class DbVersionMigrator with WalletDB { id: node.id, useSSL: node.useSSL, torEnabled: node.torEnabled, - clearEnabled: node.plainEnabled, + clearnetEnabled: node.clearnetEnabled, ), prefs: prefs, failovers: failovers, diff --git a/lib/electrumx_rpc/electrumx_client.dart b/lib/electrumx_rpc/electrumx_client.dart index 986fad95c..dff2b68fd 100644 --- a/lib/electrumx_rpc/electrumx_client.dart +++ b/lib/electrumx_rpc/electrumx_client.dart @@ -55,7 +55,7 @@ class ElectrumXNode { required this.id, required this.useSSL, required this.torEnabled, - required this.clearEnabled, + required this.clearnetEnabled, }); final String address; final int port; @@ -63,7 +63,7 @@ class ElectrumXNode { final String id; final bool useSSL; final bool torEnabled; - final bool clearEnabled; + final bool clearnetEnabled; factory ElectrumXNode.from(ElectrumXNode node) { return ElectrumXNode( @@ -73,7 +73,7 @@ class ElectrumXNode { id: node.id, useSSL: node.useSSL, torEnabled: node.torEnabled, - clearEnabled: node.clearEnabled, + clearnetEnabled: node.clearnetEnabled, ); } @@ -210,7 +210,7 @@ class ElectrumXClient { cryptoCurrency: cryptoCurrency, netType: TorPlainNetworkOption.fromNodeData( node.torEnabled, - node.clearEnabled, + node.clearnetEnabled, ), ); } diff --git a/lib/models/node_model.dart b/lib/models/node_model.dart index a945a5eb7..e4d3f66b6 100644 --- a/lib/models/node_model.dart +++ b/lib/models/node_model.dart @@ -42,7 +42,7 @@ class NodeModel { // @HiveField(11) final bool torEnabled; // @HiveField(12) - final bool plainEnabled; + final bool clearnetEnabled; NodeModel({ required this.host, @@ -55,7 +55,7 @@ class NodeModel { required this.isFailover, required this.isDown, required this.torEnabled, - required this.plainEnabled, + required this.clearnetEnabled, this.loginName, this.trusted, }); @@ -72,7 +72,7 @@ class NodeModel { bool? isDown, bool? trusted, bool? torEnabled, - bool? plainEnabled, + bool? clearnetEnabled, }) { return NodeModel( host: host ?? this.host, @@ -87,7 +87,7 @@ class NodeModel { isDown: isDown ?? this.isDown, trusted: trusted ?? this.trusted, torEnabled: torEnabled ?? this.torEnabled, - plainEnabled: plainEnabled ?? this.plainEnabled, + clearnetEnabled: clearnetEnabled ?? this.clearnetEnabled, ); } @@ -110,7 +110,7 @@ class NodeModel { map['isDown'] = isDown; map['trusted'] = trusted; map['torEnabled'] = torEnabled; - map['plainEnabled'] = plainEnabled; + map['clearEnabled'] = clearnetEnabled; return map; } diff --git a/lib/models/type_adaptors/node_model.g.dart b/lib/models/type_adaptors/node_model.g.dart index cc771ba09..32490fd50 100644 --- a/lib/models/type_adaptors/node_model.g.dart +++ b/lib/models/type_adaptors/node_model.g.dart @@ -29,7 +29,7 @@ class NodeModelAdapter extends TypeAdapter { isDown: fields[9] as bool, trusted: fields[10] as bool?, torEnabled: fields[11] as bool? ?? true, - plainEnabled: fields[12] as bool? ?? true, + clearnetEnabled: fields[12] as bool? ?? true, ); } @@ -62,7 +62,7 @@ class NodeModelAdapter extends TypeAdapter { ..writeByte(11) ..write(obj.torEnabled) ..writeByte(12) - ..write(obj.plainEnabled); + ..write(obj.clearnetEnabled); } @override 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 6480c52f0..8695f1ea3 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 @@ -252,7 +252,7 @@ class _AddEditNodeViewState extends ConsumerState { trusted: formData.trusted!, isDown: false, torEnabled: torEnabled, - plainEnabled: plainEnabled, + clearnetEnabled: plainEnabled, ); await ref.read(nodeServiceChangeNotifierProvider).add( @@ -280,7 +280,7 @@ class _AddEditNodeViewState extends ConsumerState { trusted: formData.trusted!, isDown: false, torEnabled: torEnabled, - plainEnabled: plainEnabled, + clearnetEnabled: plainEnabled, ); await ref.read(nodeServiceChangeNotifierProvider).add( @@ -755,9 +755,9 @@ class _NodeFormState extends ConsumerState { _isFailover = node.isFailover; _trusted = node.trusted ?? false; - if (node.torEnabled && !node.plainEnabled) { + if (node.torEnabled && !node.clearnetEnabled) { netOption = TorPlainNetworkOption.tor; - } else if (node.plainEnabled && !node.torEnabled) { + } else if (node.clearnetEnabled && !node.torEnabled) { netOption = TorPlainNetworkOption.clear; } else { netOption = TorPlainNetworkOption.both; diff --git a/lib/pages/settings_views/global_settings_view/manage_nodes_views/node_details_view.dart b/lib/pages/settings_views/global_settings_view/manage_nodes_views/node_details_view.dart index 3b83d5690..56c87e5c4 100644 --- a/lib/pages/settings_views/global_settings_view/manage_nodes_views/node_details_view.dart +++ b/lib/pages/settings_views/global_settings_view/manage_nodes_views/node_details_view.dart @@ -308,7 +308,7 @@ class _NodeDetailsViewState extends ConsumerState { } else { netOption = TorPlainNetworkOption.fromNodeData( node.torEnabled, - node.plainEnabled, + node.clearnetEnabled, ); } @@ -391,7 +391,7 @@ class _NodeDetailsViewState extends ConsumerState { TorPlainNetworkOption.tor || ref.read(nodeFormDataProvider).netOption == TorPlainNetworkOption.both, - plainEnabled: + clearnetEnabled: ref.read(nodeFormDataProvider).netOption == TorPlainNetworkOption.clear || ref.read(nodeFormDataProvider).netOption == diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart index 6846686ab..3d06d713d 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart @@ -1273,7 +1273,7 @@ abstract class SWB { isFailover: node['isFailover'] as bool, isDown: node['isDown'] as bool, torEnabled: node['torEnabled'] as bool? ?? true, - plainEnabled: node['plainEnabled'] as bool? ?? true, + clearnetEnabled: node['plainEnabled'] as bool? ?? true, ), node["password"] as String?, true, diff --git a/lib/services/node_service.dart b/lib/services/node_service.dart index a0f5c8065..e55e2218b 100644 --- a/lib/services/node_service.dart +++ b/lib/services/node_service.dart @@ -60,7 +60,7 @@ class NodeService extends ChangeNotifier { isFailover: savedNode.isFailover, trusted: savedNode.trusted, torEnabled: savedNode.torEnabled, - plainEnabled: savedNode.plainEnabled, + clearnetEnabled: savedNode.clearnetEnabled, ), ); } @@ -78,7 +78,7 @@ class NodeService extends ChangeNotifier { isFailover: primaryNode.isFailover, trusted: primaryNode.trusted, torEnabled: primaryNode.torEnabled, - plainEnabled: primaryNode.plainEnabled, + clearnetEnabled: primaryNode.clearnetEnabled, ), ); } @@ -260,7 +260,7 @@ class NodeService extends ChangeNotifier { isFailover: true, torEnabled: nodeMap["torEnabled"] == "true", isDown: nodeMap["isDown"] == "true", - plainEnabled: nodeMap["plainEnabled"] == "true", + clearnetEnabled: nodeMap["plainEnabled"] == "true", ); final currentNode = getNodeById(id: nodeMap["id"] as String); if (currentNode != null) { diff --git a/lib/services/notifications_service.dart b/lib/services/notifications_service.dart index 3748791d9..065285257 100644 --- a/lib/services/notifications_service.dart +++ b/lib/services/notifications_service.dart @@ -137,12 +137,12 @@ class NotificationsService extends ChangeNotifier { if (node != null) { if (wallet is ElectrumXInterface) { if (prefs.useTor) { - if (node.plainEnabled && !node.torEnabled) { + if (node.clearnetEnabled && !node.torEnabled) { // just ignore I guess?? return; } } else { - if (node.torEnabled && !node.plainEnabled) { + if (node.torEnabled && !node.clearnetEnabled) { // just ignore I guess?? return; } @@ -155,7 +155,7 @@ class NotificationsService extends ChangeNotifier { id: node.id, useSSL: node.useSSL, torEnabled: node.torEnabled, - clearEnabled: node.plainEnabled, + clearnetEnabled: node.clearnetEnabled, ); final failovers = nodeService .failoverNodesFor(currency: coin) @@ -167,7 +167,7 @@ class NotificationsService extends ChangeNotifier { id: e.id, useSSL: e.useSSL, torEnabled: node.torEnabled, - clearEnabled: node.plainEnabled, + clearnetEnabled: node.clearnetEnabled, ), ) .toList(); diff --git a/lib/wallets/crypto_currency/coins/banano.dart b/lib/wallets/crypto_currency/coins/banano.dart index c32adb8f4..8b1e1114b 100644 --- a/lib/wallets/crypto_currency/coins/banano.dart +++ b/lib/wallets/crypto_currency/coins/banano.dart @@ -78,7 +78,7 @@ class Banano extends NanoCurrency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/bitcoin.dart b/lib/wallets/crypto_currency/coins/bitcoin.dart index c3dfa4bb8..35a9cf8f0 100644 --- a/lib/wallets/crypto_currency/coins/bitcoin.dart +++ b/lib/wallets/crypto_currency/coins/bitcoin.dart @@ -240,7 +240,7 @@ class Bitcoin extends Bip39HDCurrency isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test: @@ -255,7 +255,7 @@ class Bitcoin extends Bip39HDCurrency isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test4: @@ -270,7 +270,7 @@ class Bitcoin extends Bip39HDCurrency isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/bitcoin_frost.dart b/lib/wallets/crypto_currency/coins/bitcoin_frost.dart index 4c75a17b6..d1f22227e 100644 --- a/lib/wallets/crypto_currency/coins/bitcoin_frost.dart +++ b/lib/wallets/crypto_currency/coins/bitcoin_frost.dart @@ -74,7 +74,7 @@ class BitcoinFrost extends FrostCurrency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test: @@ -89,7 +89,7 @@ class BitcoinFrost extends FrostCurrency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test4: @@ -104,7 +104,7 @@ class BitcoinFrost extends FrostCurrency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/bitcoincash.dart b/lib/wallets/crypto_currency/coins/bitcoincash.dart index 0d60de787..6f6d5e4b5 100644 --- a/lib/wallets/crypto_currency/coins/bitcoincash.dart +++ b/lib/wallets/crypto_currency/coins/bitcoincash.dart @@ -299,7 +299,7 @@ class Bitcoincash extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test: @@ -314,7 +314,7 @@ class Bitcoincash extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/cardano.dart b/lib/wallets/crypto_currency/coins/cardano.dart index 1f8fac465..71ea2c372 100644 --- a/lib/wallets/crypto_currency/coins/cardano.dart +++ b/lib/wallets/crypto_currency/coins/cardano.dart @@ -78,7 +78,7 @@ class Cardano extends Bip39Currency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/dash.dart b/lib/wallets/crypto_currency/coins/dash.dart index dc508c4cc..1a63f1811 100644 --- a/lib/wallets/crypto_currency/coins/dash.dart +++ b/lib/wallets/crypto_currency/coins/dash.dart @@ -190,7 +190,7 @@ class Dash extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/dogecoin.dart b/lib/wallets/crypto_currency/coins/dogecoin.dart index ad1899fb6..ce10bc0d7 100644 --- a/lib/wallets/crypto_currency/coins/dogecoin.dart +++ b/lib/wallets/crypto_currency/coins/dogecoin.dart @@ -190,7 +190,7 @@ class Dogecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test: @@ -205,7 +205,7 @@ class Dogecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/ecash.dart b/lib/wallets/crypto_currency/coins/ecash.dart index 84ae7bfb8..4074b249d 100644 --- a/lib/wallets/crypto_currency/coins/ecash.dart +++ b/lib/wallets/crypto_currency/coins/ecash.dart @@ -290,7 +290,7 @@ class Ecash extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/epiccash.dart b/lib/wallets/crypto_currency/coins/epiccash.dart index 2c3dbd437..25fdd6c9c 100644 --- a/lib/wallets/crypto_currency/coins/epiccash.dart +++ b/lib/wallets/crypto_currency/coins/epiccash.dart @@ -81,7 +81,7 @@ class Epiccash extends Bip39Currency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/ethereum.dart b/lib/wallets/crypto_currency/coins/ethereum.dart index 32eb754e6..1d7bb53ed 100644 --- a/lib/wallets/crypto_currency/coins/ethereum.dart +++ b/lib/wallets/crypto_currency/coins/ethereum.dart @@ -58,7 +58,7 @@ class Ethereum extends Bip39Currency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); @override diff --git a/lib/wallets/crypto_currency/coins/firo.dart b/lib/wallets/crypto_currency/coins/firo.dart index bbe83e526..26957600d 100644 --- a/lib/wallets/crypto_currency/coins/firo.dart +++ b/lib/wallets/crypto_currency/coins/firo.dart @@ -232,7 +232,7 @@ class Firo extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test: @@ -260,7 +260,7 @@ class Firo extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/litecoin.dart b/lib/wallets/crypto_currency/coins/litecoin.dart index 46cd1d3ee..91b444f73 100644 --- a/lib/wallets/crypto_currency/coins/litecoin.dart +++ b/lib/wallets/crypto_currency/coins/litecoin.dart @@ -221,7 +221,7 @@ class Litecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test: @@ -236,7 +236,7 @@ class Litecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/monero.dart b/lib/wallets/crypto_currency/coins/monero.dart index ec3d9bae1..7e0347775 100644 --- a/lib/wallets/crypto_currency/coins/monero.dart +++ b/lib/wallets/crypto_currency/coins/monero.dart @@ -73,7 +73,7 @@ class Monero extends CryptonoteCurrency { isDown: false, trusted: true, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/namecoin.dart b/lib/wallets/crypto_currency/coins/namecoin.dart index aab17df11..e390d599e 100644 --- a/lib/wallets/crypto_currency/coins/namecoin.dart +++ b/lib/wallets/crypto_currency/coins/namecoin.dart @@ -103,7 +103,7 @@ class Namecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); // case CryptoCurrencyNetwork.test: // TODO: [prio=low] Add testnet support. diff --git a/lib/wallets/crypto_currency/coins/nano.dart b/lib/wallets/crypto_currency/coins/nano.dart index c5d9c9446..0909b8aa8 100644 --- a/lib/wallets/crypto_currency/coins/nano.dart +++ b/lib/wallets/crypto_currency/coins/nano.dart @@ -78,7 +78,7 @@ class Nano extends NanoCurrency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/particl.dart b/lib/wallets/crypto_currency/coins/particl.dart index 80d6104c3..067aae72d 100644 --- a/lib/wallets/crypto_currency/coins/particl.dart +++ b/lib/wallets/crypto_currency/coins/particl.dart @@ -98,7 +98,7 @@ class Particl extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); // case CryptoCurrencyNetwork.test: // TODO: [prio=low] Add testnet. diff --git a/lib/wallets/crypto_currency/coins/peercoin.dart b/lib/wallets/crypto_currency/coins/peercoin.dart index 6074d093c..b67b0e1ab 100644 --- a/lib/wallets/crypto_currency/coins/peercoin.dart +++ b/lib/wallets/crypto_currency/coins/peercoin.dart @@ -104,7 +104,7 @@ class Peercoin extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test: @@ -119,7 +119,7 @@ class Peercoin extends Bip39HDCurrency with ElectrumXCurrencyInterface { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/solana.dart b/lib/wallets/crypto_currency/coins/solana.dart index 3bf00c358..1db985c76 100644 --- a/lib/wallets/crypto_currency/coins/solana.dart +++ b/lib/wallets/crypto_currency/coins/solana.dart @@ -56,7 +56,7 @@ class Solana extends Bip39Currency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: throw Exception("Unsupported network: $network"); diff --git a/lib/wallets/crypto_currency/coins/stellar.dart b/lib/wallets/crypto_currency/coins/stellar.dart index 75fceb211..d799de31b 100644 --- a/lib/wallets/crypto_currency/coins/stellar.dart +++ b/lib/wallets/crypto_currency/coins/stellar.dart @@ -69,7 +69,7 @@ class Stellar extends Bip39Currency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); case CryptoCurrencyNetwork.test: @@ -84,7 +84,7 @@ class Stellar extends Bip39Currency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/tezos.dart b/lib/wallets/crypto_currency/coins/tezos.dart index ff9b167c9..0cb8cca0c 100644 --- a/lib/wallets/crypto_currency/coins/tezos.dart +++ b/lib/wallets/crypto_currency/coins/tezos.dart @@ -119,7 +119,7 @@ class Tezos extends Bip39Currency { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/crypto_currency/coins/wownero.dart b/lib/wallets/crypto_currency/coins/wownero.dart index 595966db4..e043fdd7b 100644 --- a/lib/wallets/crypto_currency/coins/wownero.dart +++ b/lib/wallets/crypto_currency/coins/wownero.dart @@ -73,7 +73,7 @@ class Wownero extends CryptonoteCurrency { isDown: false, trusted: true, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); default: diff --git a/lib/wallets/wallet/impl/bitcoin_frost_wallet.dart b/lib/wallets/wallet/impl/bitcoin_frost_wallet.dart index aa1bab4e7..313f1afb6 100644 --- a/lib/wallets/wallet/impl/bitcoin_frost_wallet.dart +++ b/lib/wallets/wallet/impl/bitcoin_frost_wallet.dart @@ -1339,7 +1339,7 @@ class BitcoinFrostWallet extends Wallet useSSL: node.useSSL, id: node.id, torEnabled: node.torEnabled, - clearEnabled: node.plainEnabled, + clearnetEnabled: node.clearnetEnabled, ); } @@ -1355,7 +1355,7 @@ class BitcoinFrostWallet extends Wallet id: e.id, useSSL: e.useSSL, torEnabled: e.torEnabled, - clearEnabled: e.plainEnabled, + clearnetEnabled: e.clearnetEnabled, ), ) .toList(); diff --git a/lib/wallets/wallet/intermediate/lib_monero_wallet.dart b/lib/wallets/wallet/intermediate/lib_monero_wallet.dart index e83ba744b..597853a62 100644 --- a/lib/wallets/wallet/intermediate/lib_monero_wallet.dart +++ b/lib/wallets/wallet/intermediate/lib_monero_wallet.dart @@ -467,7 +467,7 @@ abstract class LibMoneroWallet final host = Uri.parse(node.host).host; ({InternetAddress host, int port})? proxy; if (prefs.useTor) { - if (node.plainEnabled && !node.torEnabled) { + if (node.clearnetEnabled && !node.torEnabled) { libMoneroWallet?.stopAutoSaving(); libMoneroWallet?.stopListeners(); libMoneroWallet?.stopSyncing(); @@ -476,7 +476,7 @@ abstract class LibMoneroWallet } proxy = TorService.sharedInstance.getProxyInfo(); } else { - if (!node.plainEnabled && node.torEnabled) { + if (!node.clearnetEnabled && node.torEnabled) { libMoneroWallet?.stopAutoSaving(); libMoneroWallet?.stopListeners(); libMoneroWallet?.stopSyncing(); @@ -1041,7 +1041,7 @@ abstract class LibMoneroWallet final node = getCurrentNode(); if (prefs.useTor) { - if (node.plainEnabled && !node.torEnabled) { + if (node.clearnetEnabled && !node.torEnabled) { libMoneroWallet?.stopAutoSaving(); libMoneroWallet?.stopListeners(); libMoneroWallet?.stopSyncing(); @@ -1049,7 +1049,7 @@ abstract class LibMoneroWallet throw Exception("TOR - clearnet mismatch"); } } else { - if (!node.plainEnabled && node.torEnabled) { + if (!node.clearnetEnabled && node.torEnabled) { libMoneroWallet?.stopAutoSaving(); libMoneroWallet?.stopListeners(); libMoneroWallet?.stopSyncing(); diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart index e764dee54..cc49149d9 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart @@ -907,7 +907,7 @@ mixin ElectrumXInterface useSSL: node.useSSL, id: node.id, torEnabled: node.torEnabled, - clearEnabled: node.plainEnabled, + clearnetEnabled: node.clearnetEnabled, ); } @@ -922,7 +922,7 @@ mixin ElectrumXInterface id: e.id, useSSL: e.useSSL, torEnabled: e.torEnabled, - clearEnabled: e.plainEnabled, + clearnetEnabled: e.clearnetEnabled, ), ) .toList(); diff --git a/lib/widgets/node_card.dart b/lib/widgets/node_card.dart index 6099ff242..85f16a135 100644 --- a/lib/widgets/node_card.dart +++ b/lib/widgets/node_card.dart @@ -168,9 +168,9 @@ class _NodeCardState extends ConsumerState { enabled: _status == "Disconnected", onTap: () async { final TorPlainNetworkOption netOption; - if (_node.torEnabled && !_node.plainEnabled) { + if (_node.torEnabled && !_node.clearnetEnabled) { netOption = TorPlainNetworkOption.tor; - } else if (_node.plainEnabled && !_node.torEnabled) { + } else if (_node.clearnetEnabled && !_node.torEnabled) { netOption = TorPlainNetworkOption.clear; } else { netOption = TorPlainNetworkOption.both; diff --git a/lib/widgets/node_options_sheet.dart b/lib/widgets/node_options_sheet.dart index 8273401b1..511be2395 100644 --- a/lib/widgets/node_options_sheet.dart +++ b/lib/widgets/node_options_sheet.dart @@ -258,9 +258,10 @@ class NodeOptionsSheet extends ConsumerWidget { ); if (context.mounted) { final TorPlainNetworkOption netOption; - if (node.torEnabled && !node.plainEnabled) { + if (node.torEnabled && + !node.clearnetEnabled) { netOption = TorPlainNetworkOption.tor; - } else if (node.plainEnabled && + } else if (node.clearnetEnabled && !node.torEnabled) { netOption = TorPlainNetworkOption.clear; } else { diff --git a/test/cached_electrumx_test.dart b/test/cached_electrumx_test.dart index 2d5b9b418..370e02972 100644 --- a/test/cached_electrumx_test.dart +++ b/test/cached_electrumx_test.dart @@ -169,7 +169,7 @@ void main() { id: "some ID", useSSL: true, torEnabled: true, - clearEnabled: true, + clearnetEnabled: true, ); final client = diff --git a/test/services/node_service_test.dart b/test/services/node_service_test.dart index d5ce1b84c..cb402deed 100644 --- a/test/services/node_service_test.dart +++ b/test/services/node_service_test.dart @@ -49,7 +49,7 @@ void main() { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); await service.setPrimaryNodeFor( coin: Bitcoin(CryptoCurrencyNetwork.main), @@ -132,7 +132,7 @@ void main() { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); final nodeB = NodeModel( host: "host2", @@ -145,7 +145,7 @@ void main() { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); final nodeC = NodeModel( host: "host3", @@ -158,7 +158,7 @@ void main() { isFailover: true, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ); setUp(() async { diff --git a/test/widget_tests/node_card_test.dart b/test/widget_tests/node_card_test.dart index 374991fab..cc706824c 100644 --- a/test/widget_tests/node_card_test.dart +++ b/test/widget_tests/node_card_test.dart @@ -38,7 +38,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), ); @@ -54,7 +54,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), ); @@ -117,7 +117,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), ); @@ -133,7 +133,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), ); @@ -197,7 +197,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), ); @@ -213,7 +213,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), ); diff --git a/test/widget_tests/node_options_sheet_test.dart b/test/widget_tests/node_options_sheet_test.dart index 6070e2473..998f6322a 100644 --- a/test/widget_tests/node_options_sheet_test.dart +++ b/test/widget_tests/node_options_sheet_test.dart @@ -37,7 +37,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, )); when(mockNodeService.getPrimaryNodeFor( @@ -52,7 +52,7 @@ void main() { coinName: "Bitcoin", isFailover: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, isDown: false)); await tester.pumpWidget( @@ -115,7 +115,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), ); @@ -133,7 +133,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), ); @@ -196,7 +196,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), ); @@ -214,7 +214,7 @@ void main() { isFailover: false, isDown: false, torEnabled: true, - plainEnabled: true, + clearnetEnabled: true, ), );