From f3b22c02ef7aba866e7c54deca01fa1b921fcda1 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 25 Nov 2021 19:14:17 -0600 Subject: [PATCH 1/3] Set correct min/max amounts for lnurlp fixes #47 --- app/controllers/lnurlpay_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/lnurlpay_controller.rb b/app/controllers/lnurlpay_controller.rb index fa9f946..2b999ac 100644 --- a/app/controllers/lnurlpay_controller.rb +++ b/app/controllers/lnurlpay_controller.rb @@ -6,8 +6,8 @@ class LnurlpayController < ApplicationController status: "OK", callback: "https://accounts.kosmos.org/lnurlpay/#{@user.address}/invoice", tag: "payRequest", - maxSendable: 1000000, - minSendable: 1000, + maxSendable: 1000000 * 1000, # msat + minSendable: 1000 * 1000, # msat metadata: metadata(@user.address), commentAllowed: 0 } From 2e312686984e51ef1314e792731f4692ade49ac1 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 25 Nov 2021 19:14:43 -0600 Subject: [PATCH 2/3] Change description and success message for lnurlp closes #46 --- app/controllers/lnurlpay_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/lnurlpay_controller.rb b/app/controllers/lnurlpay_controller.rb index 2b999ac..e14917b 100644 --- a/app/controllers/lnurlpay_controller.rb +++ b/app/controllers/lnurlpay_controller.rb @@ -28,7 +28,7 @@ class LnurlpayController < ApplicationController status: "OK", successAction: { tag: "message", - message: "Payment received. Thanks!" + message: "Sats received. Thank you!" }, routes: [], pr: payment_request @@ -44,7 +44,7 @@ class LnurlpayController < ApplicationController end def metadata(address) - "[[\"text/identifier\", \"#{address}\"], [\"text/plain\", \"Sats for #{address}\"]]" + "[[\"text/identifier\", \"#{address}\"], [\"text/plain\", \"Send sats, receive thanks.\"]]" end def validate_amount(amount) From 67d148d11706023d7ea3180caf8cba7fca148eaa Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Fri, 26 Nov 2021 11:34:51 -0600 Subject: [PATCH 3/3] Lower the minimum receivable via lnurlp --- app/controllers/lnurlpay_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/lnurlpay_controller.rb b/app/controllers/lnurlpay_controller.rb index e14917b..8b40c56 100644 --- a/app/controllers/lnurlpay_controller.rb +++ b/app/controllers/lnurlpay_controller.rb @@ -7,7 +7,7 @@ class LnurlpayController < ApplicationController callback: "https://accounts.kosmos.org/lnurlpay/#{@user.address}/invoice", tag: "payRequest", maxSendable: 1000000 * 1000, # msat - minSendable: 1000 * 1000, # msat + minSendable: 100 * 1000, # msat metadata: metadata(@user.address), commentAllowed: 0 }