This commit is contained in:
M
2020-09-30 21:23:15 +03:00
parent 6da61649cb
commit fe147ff9ed
49 changed files with 702 additions and 731 deletions
+6 -1
View File
@@ -39,12 +39,17 @@ class Node extends HiveObject with Keyable {
int typeRaw;
@override
dynamic get keyIndex => key;
dynamic get keyIndex {
_keyIndex ??= key;
return _keyIndex;
}
WalletType get type => deserializeFromInt(typeRaw);
set type(WalletType type) => typeRaw = serializeToInt(type);
dynamic _keyIndex;
Future<bool> requestNode() async {
try {
switch (type) {
+3 -3
View File
@@ -39,9 +39,9 @@ Future<List<Node>> loadElectrumServerList() async {
Future resetToDefault(Box<Node> nodeSource) async {
final moneroNodes = await loadDefaultNodes();
final bitcoinElectrumServerList = await loadElectrumServerList();
final nodes = moneroNodes + bitcoinElectrumServerList;
// final bitcoinElectrumServerList = await loadElectrumServerList();
// final nodes = moneroNodes + bitcoinElectrumServerList;
await nodeSource.clear();
await nodeSource.addAll(nodes);
await nodeSource.addAll(moneroNodes);
}