Skip to content

Commit e181bf4

Browse files
thomasbarrettThomas Barrett
authored andcommitted
Add support for AMP and zero amount invoices
1 parent 62ea2bd commit e181bf4

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PKG := github.com/lightninglabs/lndclient
1+
PKG := github.com/thomasbarrett/lndclient
22

33
LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint
44

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/lightninglabs/lndclient
1+
module github.com/thomasbarrett/lndclient
22

33
require (
44
github.com/btcsuite/btcd v0.22.0-beta.0.20211005184431-e3449998be39

lightning_client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,6 +1390,7 @@ func (s *lightningClient) AddInvoice(ctx context.Context,
13901390
Expiry: in.Expiry,
13911391
CltvExpiry: in.CltvExpiry,
13921392
Private: true,
1393+
IsAmp: in.Amp,
13931394
}
13941395

13951396
if in.Preimage != nil {

macaroon_recipes_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"io/ioutil"
77
"testing"
88

9-
"github.com/lightninglabs/lndclient"
109
"github.com/stretchr/testify/require"
10+
"github.com/thomasbarrett/lndclient"
1111
)
1212

1313
var (

router_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ func (r *routerClient) SendPayment(ctx context.Context,
379379
MaxParts: request.MaxParts,
380380
OutgoingChanIds: request.OutgoingChanIds,
381381
AllowSelfPayment: request.AllowSelfPayment,
382+
Amt: int64(request.Amount),
382383
}
383384
if request.MaxCltv != nil {
384385
rpcReq.CltvLimit = *request.MaxCltv
@@ -415,7 +416,6 @@ func (r *routerClient) SendPayment(ctx context.Context,
415416
// payment parameters.
416417
if request.Invoice == "" {
417418
rpcReq.Dest = request.Target[:]
418-
rpcReq.Amt = int64(request.Amount)
419419
rpcReq.PaymentHash = request.PaymentHash[:]
420420
rpcReq.FinalCltvDelta = int32(request.FinalCLTVDelta)
421421

0 commit comments

Comments
 (0)