Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo and whitespace #211

Merged
merged 3 commits into from
Jul 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="center">
<img alt="LNDHub.go" src="static/img/logo.png" width="400">
</div>
# LndHub.go

# Wrapper for Lightning Network Daemon (lnd) ⚡
![LndHub.go](static/img/logo.png)

Wrapper for Lightning Network Daemon (lnd) ⚡

It provides separate accounts with minimum trust for end users.
Live deployment at [ln.getalby.com](https://ln.getalby.com).
Expand Down
8 changes: 4 additions & 4 deletions controllers/home.ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ func (controller *HomeController) Home(c echo.Context) error {
return err
}
// See original code: https://github.com/BlueWallet/LndHub/blob/master/controllers/website.js#L32
maxChanCapicity := -1
maxChanCapacity := -1
for _, ch := range channels.Channels {
maxChanCapicity = Max(maxChanCapicity, int(ch.Capacity))
maxChanCapacity = Max(maxChanCapacity, int(ch.Capacity))
}
channelSlice := []Channel{}
for _, ch := range channels.Channels {

magic := maxChanCapicity / 100
magic := maxChanCapacity / 100
channelSlice = append(channelSlice, Channel{
Name: pubkeyToName[ch.RemotePubkey],
RemotePubkey: ch.RemotePubkey,
Expand All @@ -117,7 +117,7 @@ func (controller *HomeController) Home(c echo.Context) error {
if err != nil {
return err
}
c.Response().Header().Set(echo.HeaderCacheControl, "public, max-age=300, stale-if-error=21600") // cache for 5 minutes or if error for 6 hours max
c.Response().Header().Set(echo.HeaderCacheControl, "public, max-age=300, stale-if-error=21600") // cache for 5 minutes or if error for 6 hours max
return c.HTMLBlob(http.StatusOK, buf.Bytes())
}

Expand Down
2 changes: 1 addition & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ var SwaggerInfo = &swag.Spec{
Host: "",
BasePath: "/",
Schemes: []string{"https", "http"},
Title: "LNDhub.go",
Title: "LndHub.go",
Description: "Accounting wrapper for the Lightning Network providing separate accounts for end-users.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"swagger": "2.0",
"info": {
"description": "Accounting wrapper for the Lightning Network providing separate accounts for end-users.",
"title": "LNDhub.go",
"title": "LndHub.go",
"contact": {
"name": "Alby",
"url": "https://getalby.com",
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ info:
license:
name: GNU GPLv3
url: https://www.gnu.org/licenses/gpl-3.0.en.html
title: LNDhub.go
title: LndHub.go
version: 0.9.0
paths:
/auth:
Expand Down
2 changes: 1 addition & 1 deletion lib/service/invoicesubscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (svc *LndhubService) createKeysendInvoice(ctx context.Context, rawInvoice *
}
userLoginCustomRecord := rawInvoice.Htlcs[0].CustomRecords[TLV_WALLET_ID]
//Find user. Our convention here is that the TLV
//record should contain the user's LNDhub login string
//record should contain the user's login string
//(LND already returns the decoded string so there is no need to hex-decode it)
user, err := svc.FindUserByLogin(ctx, string(userLoginCustomRecord))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var indexHtml string
//go:embed static/*
var staticContent embed.FS

// @title LNDhub.go
// @title LndHub.go
// @version 0.9.0
// @description Accounting wrapper for the Lightning Network providing separate accounts for end-users.

Expand Down
8 changes: 4 additions & 4 deletions notes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Rebuilding LndHub

Goal of this project is to build a simple accounting system with a [LNDHub](https://github.com/BlueWallet/LndHub) compatible API that focusses on simplicity, maintainability and ease of deployment.
Goal of this project is to build a simple accounting system with a [LndHub](https://github.com/BlueWallet/LndHub) compatible API that focusses on simplicity, maintainability and ease of deployment.

[LNDHub](https://github.com/BlueWallet/LndHub) is a simple accounting system for LND. It allows users to send and receive lightning payments. Through the API people can access funds through a shared lightning node. (see overview.png diagram)
[LndHub](https://github.com/BlueWallet/LndHub) is a simple accounting system for LND. It allows users to send and receive lightning payments. Through the API people can access funds through a shared lightning node. (see overview.png diagram)

Some design goals:

Expand All @@ -17,7 +17,7 @@ Some design goals:

### API endpoints

See [LNDHub API](https://github.com/BlueWallet/LndHub/blob/master/controllers/api.js) for enpoints and request/response signatures.
See [LndHub API](https://github.com/BlueWallet/LndHub/blob/master/controllers/api.js) for enpoints and request/response signatures.

#### /create
Create a new user account
Expand Down Expand Up @@ -59,4 +59,4 @@ Node information

### Links

* [LNDHub](https://github.com/BlueWallet/LndHub) - Current nodejs implementation
* [LndHub](https://github.com/BlueWallet/LndHub) - Current nodejs implementation
Binary file modified static/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.