Skip to content

Commit f561547

Browse files
authored
fix: remove lnd certificate from user config if not provided (#1106)
* fix: remove lnd certificate from user config if not provided * chore: change comment * chore: only set empty certhex if backend is LND
1 parent e2e5967 commit f561547

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

config/config.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ func (cfg *config) init(env *AppConfig) error {
7171
if err != nil {
7272
return err
7373
}
74+
} else if cfg.Env.LNBackendType == "LND" {
75+
// If no LNDCertFile is provided, clear any stored certificate
76+
// hex value so that no certificate is used for TLS verification.
77+
err := cfg.SetUpdate("LNDCertHex", "", "")
78+
if err != nil {
79+
return err
80+
}
7481
}
7582
if cfg.Env.LNDMacaroonFile != "" {
7683
macBytes, err := os.ReadFile(cfg.Env.LNDMacaroonFile)

0 commit comments

Comments
 (0)