should fix #109, for coins that dont exist

This commit is contained in:
Marco 2022-10-15 14:54:00 -06:00
parent c7d4c4fc70
commit ac849c71fc

View file

@ -997,10 +997,14 @@ abstract class SWB {
// primary nodes
if (primaryNodes != null) {
for (var node in primaryNodes) {
await nodeService.setPrimaryNodeFor(
coin: coinFromPrettyName(node['coinName'] as String),
node: nodeService.getNodeById(id: node['id'] as String)!,
);
try {
await nodeService.setPrimaryNodeFor(
coin: coinFromPrettyName(node['coinName'] as String),
node: nodeService.getNodeById(id: node['id'] as String)!,
);
} catch (e, s) {
Logging.instance.log("$e $s", level: LogLevel.Error);
}
}
}
await nodeService.updateDefaults();
@ -1175,10 +1179,14 @@ abstract class SWB {
}
if (primaryNodes != null) {
for (var node in primaryNodes) {
await nodeService.setPrimaryNodeFor(
coin: coinFromPrettyName(node['coinName'] as String),
node: nodeService.getNodeById(id: node['id'] as String)!,
);
try {
await nodeService.setPrimaryNodeFor(
coin: coinFromPrettyName(node['coinName'] as String),
node: nodeService.getNodeById(id: node['id'] as String)!,
);
} catch (e, s) {
Logging.instance.log("$e $s", level: LogLevel.Error);
}
}
}
await nodeService.updateDefaults();