Offer LNURL QR code for download on Lightning info page #135
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/lightning_donation_qr_codes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a section for downloading lnurl-pay QR codes to print out or publish in any other way. Options for SVG and PNG.
closes #134
I tried to get
akkounts
running on my local computer but I kept running into issues, I fixed a few things but then ran into more. It looks like part of the databasesettings
table wasn't properly initialized and/or something else.Just looking at the code, it seems alright to me. Would love to be able to try this out in production!
@ -11,0 +21,4 @@
lnurlp_bech32 = Lnurl.new(lnurlp_url).to_bech32
qr_code = RQRCode::QRCode.new("lightning:" + lnurlp_bech32)
if params[:format] == "svg"
why don't you use
respond_to
here?Good question. Should've done so to begin with. Refactored and pushed.
I'd move the logic out of this block and only have
@ -11,0 +35,4 @@
send_data(
qr_svg,
filename: "bitcoin-lightning-#{current_user.address}.svg",
type: "image/svg+xml"
does this need a
disposition
attribute? 🤔Disposition should default to attachment, i.e. download. It works exactly as intended in FF, maybe you could test manually in another browser?