diff --git a/aperture.go b/aperture.go index cdcd2e0..95a3193 100644 --- a/aperture.go +++ b/aperture.go @@ -82,6 +82,10 @@ const ( // invoiceMacaroonName is the name of the invoice macaroon belonging // to the target lnd node. invoiceMacaroonName = "invoice.macaroon" + + // defaultMailboxAddress is the default address of the mailbox server + // that will be used if none is specified. + defaultMailboxAddress = "mailbox.terminal.lightning.today:443" ) var ( @@ -591,6 +595,11 @@ func getConfig() (*Config, error) { cfg.Authenticator.MacDir, ) + // Set default mailbox address if none is set. + if cfg.Authenticator.MailboxAddress == "" { + cfg.Authenticator.MailboxAddress = defaultMailboxAddress + } + // Then check the configuration that we got from the config file, all // required values need to be set at this point. if err := cfg.validate(); err != nil {