mirror of
https://github.com/nbd-wtf/satdress.git
synced 2024-11-11 16:30:35 +00:00
adapt to new makeinvoice which fully supports updated CLN and commando.
This commit is contained in:
parent
dadd45cf08
commit
37a104729c
4
Makefile
4
Makefile
|
@ -2,6 +2,6 @@ satdress: $(shell find . -name "*.go") $(shell find . -name "*.html") $(shell fi
|
|||
CC=$$(which musl-gcc) go build -ldflags='-s -w -linkmode external -extldflags "-static"' -o ./satdress
|
||||
|
||||
deploy: satdress
|
||||
ssh root@turgot 'systemctl stop bitmia tinytip payaddress paymentlink'
|
||||
ssh root@turgot 'systemctl stop payaddress'
|
||||
scp satdress turgot:satdress/satdress
|
||||
ssh root@turgot 'systemctl start bitmia tinytip payaddress paymentlink'
|
||||
ssh root@turgot 'systemctl start payaddress'
|
||||
|
|
2
go.mod
2
go.mod
|
@ -5,7 +5,7 @@ go 1.16
|
|||
require (
|
||||
github.com/cockroachdb/pebble v0.0.0-20210812144839-61318a019370
|
||||
github.com/fiatjaf/go-lnurl v1.4.0
|
||||
github.com/fiatjaf/makeinvoice v1.4.0
|
||||
github.com/fiatjaf/makeinvoice v1.5.1
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/kelseyhightower/envconfig v1.4.0
|
||||
github.com/lib/pq v1.10.3
|
||||
|
|
4
go.sum
4
go.sum
|
@ -220,8 +220,8 @@ github.com/fiatjaf/lightningd-gjson-rpc v1.4.0 h1:Iv5tt4YuNoSMfR39wiV0tqnHYTJ85o
|
|||
github.com/fiatjaf/lightningd-gjson-rpc v1.4.0/go.mod h1:SQGA0qcY2qypaMXDQlE5V5+2MnLZzQ7NzfRsScliFeE=
|
||||
github.com/fiatjaf/ln-decodepay v1.0.0 h1:1YUMjvLock+BicMNwoZ/OA3oG2ZYEaJ8AzdS6EGVMTQ=
|
||||
github.com/fiatjaf/ln-decodepay v1.0.0/go.mod h1:/LWK+ZUa3i8MqbRjIMAiVQS2+NbhwKWlwib2n446cMQ=
|
||||
github.com/fiatjaf/makeinvoice v1.4.0 h1:lXae4tbEYQvjepZDO84xb0Lo+EkUe+KAAwO89rJAlRM=
|
||||
github.com/fiatjaf/makeinvoice v1.4.0/go.mod h1:ifTgHnXswV6LE21YBXKNAMC5g0wox6m1t1tT+O3dQiw=
|
||||
github.com/fiatjaf/makeinvoice v1.5.1 h1:mVkIjm7dcvkwgAVJeCbk12F1BDtedHNN4qDKPRQJoYc=
|
||||
github.com/fiatjaf/makeinvoice v1.5.1/go.mod h1:ifTgHnXswV6LE21YBXKNAMC5g0wox6m1t1tT+O3dQiw=
|
||||
github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA=
|
||||
github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c=
|
||||
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
@ -75,8 +74,8 @@ func makeInvoice(
|
|||
mip.Description = fmt.Sprintf("%s's PIN for '%s@%s' lightning address: %s", params.Domain, params.Name, params.Domain, *pin)
|
||||
} else {
|
||||
// make the lnurlpay description_hash
|
||||
h := sha256.Sum256([]byte(makeMetadata(params)))
|
||||
mip.DescriptionHash = h[:]
|
||||
mip.Description = makeMetadata(params)
|
||||
mip.UseDescriptionHash = true
|
||||
}
|
||||
|
||||
// actually generate the invoice
|
||||
|
|
Loading…
Reference in New Issue
Block a user