From aa9e1bc4a4a6dfebb1477d3b63ea4de72309775f Mon Sep 17 00:00:00 2001 From: kiwiidb Date: Mon, 21 Mar 2022 16:58:57 +0100 Subject: [PATCH] encode description hash again to hex --- lnd/c-lightning.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lnd/c-lightning.go b/lnd/c-lightning.go index f63c111..fd3df7b 100644 --- a/lnd/c-lightning.go +++ b/lnd/c-lightning.go @@ -2,6 +2,7 @@ package lnd import ( "context" + "encoding/hex" "fmt" "reflect" "time" @@ -38,7 +39,7 @@ func NewCLNClient(options CLNClientOptions) (*CLNClient, error) { handler: handler, client: &cln.Client{ PaymentHandler: handler.Handle, - CallTimeout: 24 * 3600 * time.Second, //should be infinite actually + CallTimeout: 24 * 3600 * time.Second, //should be infinite actually //Path: "", //LightningDir: "", SparkURL: options.SparkUrl, @@ -170,7 +171,7 @@ func (cl *CLNClient) AddInvoice(ctx context.Context, req *lnrpc.Invoice, options arg := req.Memo if !reflect.DeepEqual(req.DescriptionHash, []byte("")) { methodToCall = "invoicewithdescriptionhash" - arg = string(req.DescriptionHash) + arg = hex.EncodeToString(req.DescriptionHash) } res, err := cl.client.Call(methodToCall, mSatAmt, uuid.String(), arg) if err != nil {