Create haven default node instead of loading from YAML (#544)

This commit is contained in:
Omar Hatem
2022-10-19 18:21:16 -04:00
committed by GitHub
parent a2dfbc6076
commit 3c4ba6da53
2 changed files with 4 additions and 2 deletions
+1 -2
View File
@@ -417,8 +417,7 @@ Future<void> checkCurrentNodes(
}
if (currentHavenNodeServer == null) {
final nodes = await loadDefaultHavenNodes();
final node = nodes.first;
final node = Node(uri: havenDefaultNodeUri, type: WalletType.haven);
await nodeSource.add(node);
await sharedPreferences.setInt(
PreferencesKey.currentHavenNodeIdKey, node.key as int);
@@ -50,6 +50,9 @@ abstract class NodeListViewModelBase with Store {
case WalletType.litecoin:
node = getLitecoinDefaultElectrumServer(nodes: _nodeSource)!;
break;
case WalletType.haven:
node = getHavenDefaultNode(nodes: _nodeSource)!;
break;
default:
throw Exception('Unexpected wallet type: ${wallet.type}');
}