mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 21:04:53 +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) {
|
if (currentHavenNodeServer == null) {
|
||||||
final nodes = await loadDefaultHavenNodes();
|
final node = Node(uri: havenDefaultNodeUri, type: WalletType.haven);
|
||||||
final node = nodes.first;
|
|
||||||
await nodeSource.add(node);
|
await nodeSource.add(node);
|
||||||
await sharedPreferences.setInt(
|
await sharedPreferences.setInt(
|
||||||
PreferencesKey.currentHavenNodeIdKey, node.key as int);
|
PreferencesKey.currentHavenNodeIdKey, node.key as int);
|
||||||
|
|
|
@ -50,6 +50,9 @@ abstract class NodeListViewModelBase with Store {
|
||||||
case WalletType.litecoin:
|
case WalletType.litecoin:
|
||||||
node = getLitecoinDefaultElectrumServer(nodes: _nodeSource)!;
|
node = getLitecoinDefaultElectrumServer(nodes: _nodeSource)!;
|
||||||
break;
|
break;
|
||||||
|
case WalletType.haven:
|
||||||
|
node = getHavenDefaultNode(nodes: _nodeSource)!;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw Exception('Unexpected wallet type: ${wallet.type}');
|
throw Exception('Unexpected wallet type: ${wallet.type}');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue