Skip to content

Commit

Permalink
Lnurl (#32)
Browse files Browse the repository at this point in the history
* dunno

* fix user lookup

* lnurl port

* fix host

* add config example

* amount error msg

* print stack trace

* lnurl_public_server

* remove public server !

* smaller

* smaller

* webhooks

* add tag to response

* add EncodedMetadata and Status

* add success action and empty routes

* update invoice memo

* description hash

* dunno

* fix user lookup

* lnurl port

* fix host

* amount error msg

* add config example

* print stack trace

* lnurl_public_server

* remove public server !

* smaller

* smaller

* webhooks

* add tag to response

* add EncodedMetadata and Status

* add success action and empty routes

* update invoice memo

* description hash

* server log

Co-authored-by: gohumble <[email protected]>
  • Loading branch information
LightningTipBot and gohumble authored Aug 30, 2021
1 parent 77c3a50 commit 998ed1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/lnbits/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewWebhook(webhookServer string, bot *tb.Bot, client *Client, database *gor
if !strings.Contains(webhookServer, "://") {
log.Fatal("invalid webhook server configuration. please add a scheme.")
}
_, port, err := net.SplitHostPort(strings.Split(webhookServer, "//")[1])
host, port, err := net.SplitHostPort(strings.Split(webhookServer, "//")[1])
if err != nil {
return nil
}
Expand All @@ -50,6 +50,7 @@ func NewWebhook(webhookServer string, bot *tb.Bot, client *Client, database *gor
}
apiServer.httpServer.Handler = apiServer.newRouter()
go apiServer.httpServer.ListenAndServe()
log.Infof("[Webhook] Server started at %s port %s", host, port)
return apiServer
}

Expand Down
1 change: 1 addition & 0 deletions internal/lnurl/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func NewServer(lnurlserver string, webhookserver string, bot *tb.Bot, client *ln

apiServer.httpServer.Handler = apiServer.newRouter()
go apiServer.httpServer.ListenAndServe()
log.Infof("[LNURL] Server started at %s port %s", host, port)
return apiServer
}

Expand Down

0 comments on commit 998ed1d

Please sign in to comment.