diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index 5dd6a4ee..0742220a 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -191,11 +191,18 @@ async def api_payments_pay_lnurl(): ) try: + extra = {} + + if params.get("successAction"): + extra["success_action"] = params["successAction"] + if g.data["comment"]: + extra["comment"] = g.data["comment"] + payment_hash = pay_invoice( wallet_id=g.wallet.id, payment_request=params["pr"], description=g.data.get("description", ""), - extra={"success_action": params.get("successAction")}, + extra=extra, ) except Exception as exc: traceback.print_exc(7) diff --git a/lnbits/static/js/components.js b/lnbits/static/js/components.js index 0d37f520..682da275 100644 --- a/lnbits/static/js/components.js +++ b/lnbits/static/js/components.js @@ -1,4 +1,4 @@ -/* global Vue, moment, LNbits, EventHub, decryptLnurlPayAES */ +/* global _, Vue, moment, LNbits, EventHub, decryptLnurlPayAES */ Vue.component('lnbits-fsat', { props: { @@ -179,6 +179,11 @@ Vue.component('lnbits-payment-details', { props: ['payment'], template: `