mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Create haven default node instead of loading from YAML (#544)
This commit is contained in:
parent
a2dfbc6076
commit
3c4ba6da53
2 changed files with 4 additions and 2 deletions
|
@ -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}');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue