Proper formatting for rhash

This commit is contained in:
Amarpreet Minhas 2023-05-03 22:25:41 -04:00
parent a1edd1266c
commit 7122e704b8

View file

@ -3,6 +3,7 @@ package lnd
import (
"context"
b64 "encoding/base64"
"encoding/hex"
"errors"
"fmt"
"strconv"
@ -36,13 +37,14 @@ func Request(rKey string, request []byte) (string, error) {
}
info, err := lndCli.AddInvoice(ctx, &lnrpc.Invoice{
Memo: fmt.Sprintf("nostr addr %s", rKey),
Expiry: 15 * 60,
Expiry: 1 * 60,
Value: addrFee,
})
if err != nil {
l.Fatal().Msg("unable to create lnd invoice")
}
spew.Dump(info)
spew.Dump(hex.EncodeToString(info.RHash))
spew.Dump(info.PaymentRequest)
spew.Dump(request)
return "x", nil
}