Change to single variable in ClientConfig (no nested GlobalSettings).

This commit is contained in:
cameronts
2022-07-28 12:50:53 -07:00
parent 1cb42e8f8b
commit 05283eff14
3 changed files with 4 additions and 9 deletions

View File

@@ -85,7 +85,7 @@ func JoinNetwork(cfg *config.ClientConfig, privateKey string) error {
if cfg.Node.IsLocal == "yes" && cfg.Node.LocalAddress != "" {
cfg.Node.Endpoint = cfg.Node.LocalAddress
} else {
cfg.Node.Endpoint, err = ncutils.GetPublicIP(cfg.GlobalSettings.PublicIPService)
cfg.Node.Endpoint, err = ncutils.GetPublicIP(cfg.PublicIPService)
}
if err != nil || cfg.Node.Endpoint == "" {
logger.Log(0, "network:", cfg.Network, "error setting cfg.Node.Endpoint.")