Skip to content

Commit 96a92f3

Browse files
authored
Merge pull request #105 from positiveblue/default-mailbox
config: set default mailbox address
2 parents 87bb996 + cd7ee83 commit 96a92f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

aperture.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ const (
8282
// invoiceMacaroonName is the name of the invoice macaroon belonging
8383
// to the target lnd node.
8484
invoiceMacaroonName = "invoice.macaroon"
85+
86+
// defaultMailboxAddress is the default address of the mailbox server
87+
// that will be used if none is specified.
88+
defaultMailboxAddress = "mailbox.terminal.lightning.today:443"
8589
)
8690

8791
var (
@@ -591,6 +595,11 @@ func getConfig() (*Config, error) {
591595
cfg.Authenticator.MacDir,
592596
)
593597

598+
// Set default mailbox address if none is set.
599+
if cfg.Authenticator.MailboxAddress == "" {
600+
cfg.Authenticator.MailboxAddress = defaultMailboxAddress
601+
}
602+
594603
// Then check the configuration that we got from the config file, all
595604
// required values need to be set at this point.
596605
if err := cfg.validate(); err != nil {

0 commit comments

Comments
 (0)