From f2ca4ac0ca0a530721a1c0407af76bf2cb3874f7 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 31 Jan 2022 13:27:45 +0100 Subject: [PATCH 1/2] Set fixed fee limit Very small amounts have problems with the percentage based fee limit. This has to be changed soon to be smarter and more dynamic --- lib/service/invoices.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/service/invoices.go b/lib/service/invoices.go index df5b653..cc1c7bc 100644 --- a/lib/service/invoices.go +++ b/lib/service/invoices.go @@ -102,10 +102,13 @@ func (svc *LndhubService) SendInternalPayment(tx *bun.Tx, invoice *models.Invoic func (svc *LndhubService) SendPaymentSync(tx *bun.Tx, invoice *models.Invoice) (SendPaymentResponse, error) { sendPaymentResponse := SendPaymentResponse{} - // TODO: set fee limit + // TODO: set dynamic fee limit feeLimit := lnrpc.FeeLimit{ - Limit: &lnrpc.FeeLimit_Percent{ - Percent: 2, + //Limit: &lnrpc.FeeLimit_Percent{ + // Percent: 2, + //}, + Limit: &lnrpc.FeeLimit_Fixed{ + Fixed: 200, }, } From 2f44889be6421c1834b50872f3c2f7e4eed5c37d Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 31 Jan 2022 13:31:07 +0100 Subject: [PATCH 2/2] 300 sat it is for now. this should work for most payments --- lib/service/invoices.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/service/invoices.go b/lib/service/invoices.go index cc1c7bc..5f29e34 100644 --- a/lib/service/invoices.go +++ b/lib/service/invoices.go @@ -108,7 +108,7 @@ func (svc *LndhubService) SendPaymentSync(tx *bun.Tx, invoice *models.Invoice) ( // Percent: 2, //}, Limit: &lnrpc.FeeLimit_Fixed{ - Fixed: 200, + Fixed: 300, }, }