mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 11:29:23 +00:00
consistent variable naming
This commit is contained in:
parent
d6d4df7822
commit
4197ff40f4
39 changed files with 88 additions and 87 deletions
|
@ -78,7 +78,7 @@ class DbVersionMigrator with WalletDB {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
useSSL: e.useSSL,
|
useSSL: e.useSSL,
|
||||||
torEnabled: e.torEnabled,
|
torEnabled: e.torEnabled,
|
||||||
clearEnabled: e.plainEnabled,
|
clearnetEnabled: e.clearnetEnabled,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
|
@ -91,7 +91,7 @@ class DbVersionMigrator with WalletDB {
|
||||||
id: node.id,
|
id: node.id,
|
||||||
useSSL: node.useSSL,
|
useSSL: node.useSSL,
|
||||||
torEnabled: node.torEnabled,
|
torEnabled: node.torEnabled,
|
||||||
clearEnabled: node.plainEnabled,
|
clearnetEnabled: node.clearnetEnabled,
|
||||||
),
|
),
|
||||||
prefs: prefs,
|
prefs: prefs,
|
||||||
failovers: failovers,
|
failovers: failovers,
|
||||||
|
|
|
@ -55,7 +55,7 @@ class ElectrumXNode {
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.useSSL,
|
required this.useSSL,
|
||||||
required this.torEnabled,
|
required this.torEnabled,
|
||||||
required this.clearEnabled,
|
required this.clearnetEnabled,
|
||||||
});
|
});
|
||||||
final String address;
|
final String address;
|
||||||
final int port;
|
final int port;
|
||||||
|
@ -63,7 +63,7 @@ class ElectrumXNode {
|
||||||
final String id;
|
final String id;
|
||||||
final bool useSSL;
|
final bool useSSL;
|
||||||
final bool torEnabled;
|
final bool torEnabled;
|
||||||
final bool clearEnabled;
|
final bool clearnetEnabled;
|
||||||
|
|
||||||
factory ElectrumXNode.from(ElectrumXNode node) {
|
factory ElectrumXNode.from(ElectrumXNode node) {
|
||||||
return ElectrumXNode(
|
return ElectrumXNode(
|
||||||
|
@ -73,7 +73,7 @@ class ElectrumXNode {
|
||||||
id: node.id,
|
id: node.id,
|
||||||
useSSL: node.useSSL,
|
useSSL: node.useSSL,
|
||||||
torEnabled: node.torEnabled,
|
torEnabled: node.torEnabled,
|
||||||
clearEnabled: node.clearEnabled,
|
clearnetEnabled: node.clearnetEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ class ElectrumXClient {
|
||||||
cryptoCurrency: cryptoCurrency,
|
cryptoCurrency: cryptoCurrency,
|
||||||
netType: TorPlainNetworkOption.fromNodeData(
|
netType: TorPlainNetworkOption.fromNodeData(
|
||||||
node.torEnabled,
|
node.torEnabled,
|
||||||
node.clearEnabled,
|
node.clearnetEnabled,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ class NodeModel {
|
||||||
// @HiveField(11)
|
// @HiveField(11)
|
||||||
final bool torEnabled;
|
final bool torEnabled;
|
||||||
// @HiveField(12)
|
// @HiveField(12)
|
||||||
final bool plainEnabled;
|
final bool clearnetEnabled;
|
||||||
|
|
||||||
NodeModel({
|
NodeModel({
|
||||||
required this.host,
|
required this.host,
|
||||||
|
@ -55,7 +55,7 @@ class NodeModel {
|
||||||
required this.isFailover,
|
required this.isFailover,
|
||||||
required this.isDown,
|
required this.isDown,
|
||||||
required this.torEnabled,
|
required this.torEnabled,
|
||||||
required this.plainEnabled,
|
required this.clearnetEnabled,
|
||||||
this.loginName,
|
this.loginName,
|
||||||
this.trusted,
|
this.trusted,
|
||||||
});
|
});
|
||||||
|
@ -72,7 +72,7 @@ class NodeModel {
|
||||||
bool? isDown,
|
bool? isDown,
|
||||||
bool? trusted,
|
bool? trusted,
|
||||||
bool? torEnabled,
|
bool? torEnabled,
|
||||||
bool? plainEnabled,
|
bool? clearnetEnabled,
|
||||||
}) {
|
}) {
|
||||||
return NodeModel(
|
return NodeModel(
|
||||||
host: host ?? this.host,
|
host: host ?? this.host,
|
||||||
|
@ -87,7 +87,7 @@ class NodeModel {
|
||||||
isDown: isDown ?? this.isDown,
|
isDown: isDown ?? this.isDown,
|
||||||
trusted: trusted ?? this.trusted,
|
trusted: trusted ?? this.trusted,
|
||||||
torEnabled: torEnabled ?? this.torEnabled,
|
torEnabled: torEnabled ?? this.torEnabled,
|
||||||
plainEnabled: plainEnabled ?? this.plainEnabled,
|
clearnetEnabled: clearnetEnabled ?? this.clearnetEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ class NodeModel {
|
||||||
map['isDown'] = isDown;
|
map['isDown'] = isDown;
|
||||||
map['trusted'] = trusted;
|
map['trusted'] = trusted;
|
||||||
map['torEnabled'] = torEnabled;
|
map['torEnabled'] = torEnabled;
|
||||||
map['plainEnabled'] = plainEnabled;
|
map['clearEnabled'] = clearnetEnabled;
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class NodeModelAdapter extends TypeAdapter<NodeModel> {
|
||||||
isDown: fields[9] as bool,
|
isDown: fields[9] as bool,
|
||||||
trusted: fields[10] as bool?,
|
trusted: fields[10] as bool?,
|
||||||
torEnabled: fields[11] as bool? ?? true,
|
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<NodeModel> {
|
||||||
..writeByte(11)
|
..writeByte(11)
|
||||||
..write(obj.torEnabled)
|
..write(obj.torEnabled)
|
||||||
..writeByte(12)
|
..writeByte(12)
|
||||||
..write(obj.plainEnabled);
|
..write(obj.clearnetEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -252,7 +252,7 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
||||||
trusted: formData.trusted!,
|
trusted: formData.trusted!,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: torEnabled,
|
torEnabled: torEnabled,
|
||||||
plainEnabled: plainEnabled,
|
clearnetEnabled: plainEnabled,
|
||||||
);
|
);
|
||||||
|
|
||||||
await ref.read(nodeServiceChangeNotifierProvider).add(
|
await ref.read(nodeServiceChangeNotifierProvider).add(
|
||||||
|
@ -280,7 +280,7 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
||||||
trusted: formData.trusted!,
|
trusted: formData.trusted!,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: torEnabled,
|
torEnabled: torEnabled,
|
||||||
plainEnabled: plainEnabled,
|
clearnetEnabled: plainEnabled,
|
||||||
);
|
);
|
||||||
|
|
||||||
await ref.read(nodeServiceChangeNotifierProvider).add(
|
await ref.read(nodeServiceChangeNotifierProvider).add(
|
||||||
|
@ -755,9 +755,9 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
||||||
_isFailover = node.isFailover;
|
_isFailover = node.isFailover;
|
||||||
_trusted = node.trusted ?? false;
|
_trusted = node.trusted ?? false;
|
||||||
|
|
||||||
if (node.torEnabled && !node.plainEnabled) {
|
if (node.torEnabled && !node.clearnetEnabled) {
|
||||||
netOption = TorPlainNetworkOption.tor;
|
netOption = TorPlainNetworkOption.tor;
|
||||||
} else if (node.plainEnabled && !node.torEnabled) {
|
} else if (node.clearnetEnabled && !node.torEnabled) {
|
||||||
netOption = TorPlainNetworkOption.clear;
|
netOption = TorPlainNetworkOption.clear;
|
||||||
} else {
|
} else {
|
||||||
netOption = TorPlainNetworkOption.both;
|
netOption = TorPlainNetworkOption.both;
|
||||||
|
|
|
@ -308,7 +308,7 @@ class _NodeDetailsViewState extends ConsumerState<NodeDetailsView> {
|
||||||
} else {
|
} else {
|
||||||
netOption = TorPlainNetworkOption.fromNodeData(
|
netOption = TorPlainNetworkOption.fromNodeData(
|
||||||
node.torEnabled,
|
node.torEnabled,
|
||||||
node.plainEnabled,
|
node.clearnetEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ class _NodeDetailsViewState extends ConsumerState<NodeDetailsView> {
|
||||||
TorPlainNetworkOption.tor ||
|
TorPlainNetworkOption.tor ||
|
||||||
ref.read(nodeFormDataProvider).netOption ==
|
ref.read(nodeFormDataProvider).netOption ==
|
||||||
TorPlainNetworkOption.both,
|
TorPlainNetworkOption.both,
|
||||||
plainEnabled:
|
clearnetEnabled:
|
||||||
ref.read(nodeFormDataProvider).netOption ==
|
ref.read(nodeFormDataProvider).netOption ==
|
||||||
TorPlainNetworkOption.clear ||
|
TorPlainNetworkOption.clear ||
|
||||||
ref.read(nodeFormDataProvider).netOption ==
|
ref.read(nodeFormDataProvider).netOption ==
|
||||||
|
|
|
@ -1273,7 +1273,7 @@ abstract class SWB {
|
||||||
isFailover: node['isFailover'] as bool,
|
isFailover: node['isFailover'] as bool,
|
||||||
isDown: node['isDown'] as bool,
|
isDown: node['isDown'] as bool,
|
||||||
torEnabled: node['torEnabled'] as bool? ?? true,
|
torEnabled: node['torEnabled'] as bool? ?? true,
|
||||||
plainEnabled: node['plainEnabled'] as bool? ?? true,
|
clearnetEnabled: node['plainEnabled'] as bool? ?? true,
|
||||||
),
|
),
|
||||||
node["password"] as String?,
|
node["password"] as String?,
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -60,7 +60,7 @@ class NodeService extends ChangeNotifier {
|
||||||
isFailover: savedNode.isFailover,
|
isFailover: savedNode.isFailover,
|
||||||
trusted: savedNode.trusted,
|
trusted: savedNode.trusted,
|
||||||
torEnabled: savedNode.torEnabled,
|
torEnabled: savedNode.torEnabled,
|
||||||
plainEnabled: savedNode.plainEnabled,
|
clearnetEnabled: savedNode.clearnetEnabled,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ class NodeService extends ChangeNotifier {
|
||||||
isFailover: primaryNode.isFailover,
|
isFailover: primaryNode.isFailover,
|
||||||
trusted: primaryNode.trusted,
|
trusted: primaryNode.trusted,
|
||||||
torEnabled: primaryNode.torEnabled,
|
torEnabled: primaryNode.torEnabled,
|
||||||
plainEnabled: primaryNode.plainEnabled,
|
clearnetEnabled: primaryNode.clearnetEnabled,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ class NodeService extends ChangeNotifier {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
torEnabled: nodeMap["torEnabled"] == "true",
|
torEnabled: nodeMap["torEnabled"] == "true",
|
||||||
isDown: nodeMap["isDown"] == "true",
|
isDown: nodeMap["isDown"] == "true",
|
||||||
plainEnabled: nodeMap["plainEnabled"] == "true",
|
clearnetEnabled: nodeMap["plainEnabled"] == "true",
|
||||||
);
|
);
|
||||||
final currentNode = getNodeById(id: nodeMap["id"] as String);
|
final currentNode = getNodeById(id: nodeMap["id"] as String);
|
||||||
if (currentNode != null) {
|
if (currentNode != null) {
|
||||||
|
|
|
@ -137,12 +137,12 @@ class NotificationsService extends ChangeNotifier {
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
if (wallet is ElectrumXInterface) {
|
if (wallet is ElectrumXInterface) {
|
||||||
if (prefs.useTor) {
|
if (prefs.useTor) {
|
||||||
if (node.plainEnabled && !node.torEnabled) {
|
if (node.clearnetEnabled && !node.torEnabled) {
|
||||||
// just ignore I guess??
|
// just ignore I guess??
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (node.torEnabled && !node.plainEnabled) {
|
if (node.torEnabled && !node.clearnetEnabled) {
|
||||||
// just ignore I guess??
|
// just ignore I guess??
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ class NotificationsService extends ChangeNotifier {
|
||||||
id: node.id,
|
id: node.id,
|
||||||
useSSL: node.useSSL,
|
useSSL: node.useSSL,
|
||||||
torEnabled: node.torEnabled,
|
torEnabled: node.torEnabled,
|
||||||
clearEnabled: node.plainEnabled,
|
clearnetEnabled: node.clearnetEnabled,
|
||||||
);
|
);
|
||||||
final failovers = nodeService
|
final failovers = nodeService
|
||||||
.failoverNodesFor(currency: coin)
|
.failoverNodesFor(currency: coin)
|
||||||
|
@ -167,7 +167,7 @@ class NotificationsService extends ChangeNotifier {
|
||||||
id: e.id,
|
id: e.id,
|
||||||
useSSL: e.useSSL,
|
useSSL: e.useSSL,
|
||||||
torEnabled: node.torEnabled,
|
torEnabled: node.torEnabled,
|
||||||
clearEnabled: node.plainEnabled,
|
clearnetEnabled: node.clearnetEnabled,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
|
@ -78,7 +78,7 @@ class Banano extends NanoCurrency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -240,7 +240,7 @@ class Bitcoin extends Bip39HDCurrency
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test:
|
case CryptoCurrencyNetwork.test:
|
||||||
|
@ -255,7 +255,7 @@ class Bitcoin extends Bip39HDCurrency
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test4:
|
case CryptoCurrencyNetwork.test4:
|
||||||
|
@ -270,7 +270,7 @@ class Bitcoin extends Bip39HDCurrency
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -74,7 +74,7 @@ class BitcoinFrost extends FrostCurrency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test:
|
case CryptoCurrencyNetwork.test:
|
||||||
|
@ -89,7 +89,7 @@ class BitcoinFrost extends FrostCurrency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test4:
|
case CryptoCurrencyNetwork.test4:
|
||||||
|
@ -104,7 +104,7 @@ class BitcoinFrost extends FrostCurrency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -299,7 +299,7 @@ class Bitcoincash extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test:
|
case CryptoCurrencyNetwork.test:
|
||||||
|
@ -314,7 +314,7 @@ class Bitcoincash extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -78,7 +78,7 @@ class Cardano extends Bip39Currency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -190,7 +190,7 @@ class Dash extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -190,7 +190,7 @@ class Dogecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test:
|
case CryptoCurrencyNetwork.test:
|
||||||
|
@ -205,7 +205,7 @@ class Dogecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -290,7 +290,7 @@ class Ecash extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Epiccash extends Bip39Currency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -58,7 +58,7 @@ class Ethereum extends Bip39Currency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -232,7 +232,7 @@ class Firo extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test:
|
case CryptoCurrencyNetwork.test:
|
||||||
|
@ -260,7 +260,7 @@ class Firo extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -221,7 +221,7 @@ class Litecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test:
|
case CryptoCurrencyNetwork.test:
|
||||||
|
@ -236,7 +236,7 @@ class Litecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -73,7 +73,7 @@ class Monero extends CryptonoteCurrency {
|
||||||
isDown: false,
|
isDown: false,
|
||||||
trusted: true,
|
trusted: true,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -103,7 +103,7 @@ class Namecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
// case CryptoCurrencyNetwork.test:
|
// case CryptoCurrencyNetwork.test:
|
||||||
// TODO: [prio=low] Add testnet support.
|
// TODO: [prio=low] Add testnet support.
|
||||||
|
|
|
@ -78,7 +78,7 @@ class Nano extends NanoCurrency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -98,7 +98,7 @@ class Particl extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
// case CryptoCurrencyNetwork.test:
|
// case CryptoCurrencyNetwork.test:
|
||||||
// TODO: [prio=low] Add testnet.
|
// TODO: [prio=low] Add testnet.
|
||||||
|
|
|
@ -104,7 +104,7 @@ class Peercoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test:
|
case CryptoCurrencyNetwork.test:
|
||||||
|
@ -119,7 +119,7 @@ class Peercoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -56,7 +56,7 @@ class Solana extends Bip39Currency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
throw Exception("Unsupported network: $network");
|
throw Exception("Unsupported network: $network");
|
||||||
|
|
|
@ -69,7 +69,7 @@ class Stellar extends Bip39Currency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
case CryptoCurrencyNetwork.test:
|
case CryptoCurrencyNetwork.test:
|
||||||
|
@ -84,7 +84,7 @@ class Stellar extends Bip39Currency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -119,7 +119,7 @@ class Tezos extends Bip39Currency {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -73,7 +73,7 @@ class Wownero extends CryptonoteCurrency {
|
||||||
isDown: false,
|
isDown: false,
|
||||||
trusted: true,
|
trusted: true,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1339,7 +1339,7 @@ class BitcoinFrostWallet<T extends FrostCurrency> extends Wallet<T>
|
||||||
useSSL: node.useSSL,
|
useSSL: node.useSSL,
|
||||||
id: node.id,
|
id: node.id,
|
||||||
torEnabled: node.torEnabled,
|
torEnabled: node.torEnabled,
|
||||||
clearEnabled: node.plainEnabled,
|
clearnetEnabled: node.clearnetEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1355,7 +1355,7 @@ class BitcoinFrostWallet<T extends FrostCurrency> extends Wallet<T>
|
||||||
id: e.id,
|
id: e.id,
|
||||||
useSSL: e.useSSL,
|
useSSL: e.useSSL,
|
||||||
torEnabled: e.torEnabled,
|
torEnabled: e.torEnabled,
|
||||||
clearEnabled: e.plainEnabled,
|
clearnetEnabled: e.clearnetEnabled,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
|
@ -467,7 +467,7 @@ abstract class LibMoneroWallet<T extends CryptonoteCurrency>
|
||||||
final host = Uri.parse(node.host).host;
|
final host = Uri.parse(node.host).host;
|
||||||
({InternetAddress host, int port})? proxy;
|
({InternetAddress host, int port})? proxy;
|
||||||
if (prefs.useTor) {
|
if (prefs.useTor) {
|
||||||
if (node.plainEnabled && !node.torEnabled) {
|
if (node.clearnetEnabled && !node.torEnabled) {
|
||||||
libMoneroWallet?.stopAutoSaving();
|
libMoneroWallet?.stopAutoSaving();
|
||||||
libMoneroWallet?.stopListeners();
|
libMoneroWallet?.stopListeners();
|
||||||
libMoneroWallet?.stopSyncing();
|
libMoneroWallet?.stopSyncing();
|
||||||
|
@ -476,7 +476,7 @@ abstract class LibMoneroWallet<T extends CryptonoteCurrency>
|
||||||
}
|
}
|
||||||
proxy = TorService.sharedInstance.getProxyInfo();
|
proxy = TorService.sharedInstance.getProxyInfo();
|
||||||
} else {
|
} else {
|
||||||
if (!node.plainEnabled && node.torEnabled) {
|
if (!node.clearnetEnabled && node.torEnabled) {
|
||||||
libMoneroWallet?.stopAutoSaving();
|
libMoneroWallet?.stopAutoSaving();
|
||||||
libMoneroWallet?.stopListeners();
|
libMoneroWallet?.stopListeners();
|
||||||
libMoneroWallet?.stopSyncing();
|
libMoneroWallet?.stopSyncing();
|
||||||
|
@ -1041,7 +1041,7 @@ abstract class LibMoneroWallet<T extends CryptonoteCurrency>
|
||||||
final node = getCurrentNode();
|
final node = getCurrentNode();
|
||||||
|
|
||||||
if (prefs.useTor) {
|
if (prefs.useTor) {
|
||||||
if (node.plainEnabled && !node.torEnabled) {
|
if (node.clearnetEnabled && !node.torEnabled) {
|
||||||
libMoneroWallet?.stopAutoSaving();
|
libMoneroWallet?.stopAutoSaving();
|
||||||
libMoneroWallet?.stopListeners();
|
libMoneroWallet?.stopListeners();
|
||||||
libMoneroWallet?.stopSyncing();
|
libMoneroWallet?.stopSyncing();
|
||||||
|
@ -1049,7 +1049,7 @@ abstract class LibMoneroWallet<T extends CryptonoteCurrency>
|
||||||
throw Exception("TOR - clearnet mismatch");
|
throw Exception("TOR - clearnet mismatch");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!node.plainEnabled && node.torEnabled) {
|
if (!node.clearnetEnabled && node.torEnabled) {
|
||||||
libMoneroWallet?.stopAutoSaving();
|
libMoneroWallet?.stopAutoSaving();
|
||||||
libMoneroWallet?.stopListeners();
|
libMoneroWallet?.stopListeners();
|
||||||
libMoneroWallet?.stopSyncing();
|
libMoneroWallet?.stopSyncing();
|
||||||
|
|
|
@ -907,7 +907,7 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
|
||||||
useSSL: node.useSSL,
|
useSSL: node.useSSL,
|
||||||
id: node.id,
|
id: node.id,
|
||||||
torEnabled: node.torEnabled,
|
torEnabled: node.torEnabled,
|
||||||
clearEnabled: node.plainEnabled,
|
clearnetEnabled: node.clearnetEnabled,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -922,7 +922,7 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
|
||||||
id: e.id,
|
id: e.id,
|
||||||
useSSL: e.useSSL,
|
useSSL: e.useSSL,
|
||||||
torEnabled: e.torEnabled,
|
torEnabled: e.torEnabled,
|
||||||
clearEnabled: e.plainEnabled,
|
clearnetEnabled: e.clearnetEnabled,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
|
@ -168,9 +168,9 @@ class _NodeCardState extends ConsumerState<NodeCard> {
|
||||||
enabled: _status == "Disconnected",
|
enabled: _status == "Disconnected",
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final TorPlainNetworkOption netOption;
|
final TorPlainNetworkOption netOption;
|
||||||
if (_node.torEnabled && !_node.plainEnabled) {
|
if (_node.torEnabled && !_node.clearnetEnabled) {
|
||||||
netOption = TorPlainNetworkOption.tor;
|
netOption = TorPlainNetworkOption.tor;
|
||||||
} else if (_node.plainEnabled && !_node.torEnabled) {
|
} else if (_node.clearnetEnabled && !_node.torEnabled) {
|
||||||
netOption = TorPlainNetworkOption.clear;
|
netOption = TorPlainNetworkOption.clear;
|
||||||
} else {
|
} else {
|
||||||
netOption = TorPlainNetworkOption.both;
|
netOption = TorPlainNetworkOption.both;
|
||||||
|
|
|
@ -258,9 +258,10 @@ class NodeOptionsSheet extends ConsumerWidget {
|
||||||
);
|
);
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
final TorPlainNetworkOption netOption;
|
final TorPlainNetworkOption netOption;
|
||||||
if (node.torEnabled && !node.plainEnabled) {
|
if (node.torEnabled &&
|
||||||
|
!node.clearnetEnabled) {
|
||||||
netOption = TorPlainNetworkOption.tor;
|
netOption = TorPlainNetworkOption.tor;
|
||||||
} else if (node.plainEnabled &&
|
} else if (node.clearnetEnabled &&
|
||||||
!node.torEnabled) {
|
!node.torEnabled) {
|
||||||
netOption = TorPlainNetworkOption.clear;
|
netOption = TorPlainNetworkOption.clear;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -169,7 +169,7 @@ void main() {
|
||||||
id: "some ID",
|
id: "some ID",
|
||||||
useSSL: true,
|
useSSL: true,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
clearEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
final client =
|
final client =
|
||||||
|
|
|
@ -49,7 +49,7 @@ void main() {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
await service.setPrimaryNodeFor(
|
await service.setPrimaryNodeFor(
|
||||||
coin: Bitcoin(CryptoCurrencyNetwork.main),
|
coin: Bitcoin(CryptoCurrencyNetwork.main),
|
||||||
|
@ -132,7 +132,7 @@ void main() {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
final nodeB = NodeModel(
|
final nodeB = NodeModel(
|
||||||
host: "host2",
|
host: "host2",
|
||||||
|
@ -145,7 +145,7 @@ void main() {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
final nodeC = NodeModel(
|
final nodeC = NodeModel(
|
||||||
host: "host3",
|
host: "host3",
|
||||||
|
@ -158,7 +158,7 @@ void main() {
|
||||||
isFailover: true,
|
isFailover: true,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
setUp(() async {
|
setUp(() async {
|
||||||
|
|
|
@ -38,7 +38,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
));
|
));
|
||||||
|
|
||||||
when(mockNodeService.getPrimaryNodeFor(
|
when(mockNodeService.getPrimaryNodeFor(
|
||||||
|
@ -52,7 +52,7 @@ void main() {
|
||||||
coinName: "Bitcoin",
|
coinName: "Bitcoin",
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
isDown: false));
|
isDown: false));
|
||||||
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
|
@ -115,7 +115,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ void main() {
|
||||||
isFailover: false,
|
isFailover: false,
|
||||||
isDown: false,
|
isDown: false,
|
||||||
torEnabled: true,
|
torEnabled: true,
|
||||||
plainEnabled: true,
|
clearnetEnabled: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue