mirror of
https://github.com/lightninglabs/aperture.git
synced 2026-01-24 03:34:25 +01:00
Merge pull request #105 from positiveblue/default-mailbox
config: set default mailbox address
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user