Skip to content

Commit

Permalink
feat: update config and rewrite on the new one from discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
maparr committed May 9, 2023
1 parent b146ec1 commit d5c7b7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions desktop/SmesherManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class SmesherManager extends AbstractManager {
updateConfig = async (netName: string, config: NodeConfig) => {
const cachedNodeConfig = await loadNodeConfigByName(netName);
const clientNodeConfig = await loadNodeConfig();
console.log('updateConfig:cachedNodeConfig');

if (R.equals(config, cachedNodeConfig)) {
return clientNodeConfig;
return false;
}

logger.log('updateConfig:discoveryCache', 'config', config);
Expand All @@ -56,7 +56,7 @@ class SmesherManager extends AbstractManager {
const mergedConfig = R.mergeDeepRight(clientNodeConfig, config);
logger.log('updateConfig:mergedConfig', 'mergedConfig', mergedConfig);
await this.writeConfig(mergedConfig);
return mergedConfig;
return true;
};

private loadConfig = async () => {
Expand Down

0 comments on commit d5c7b7e

Please sign in to comment.