Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QR code scanner does not recognize LNURL #248

Closed
prusnak opened this issue Oct 18, 2023 · 9 comments · Fixed by #324
Closed

QR code scanner does not recognize LNURL #248

prusnak opened this issue Oct 18, 2023 · 9 comments · Fixed by #324
Assignees
Labels
enhancement New feature or request priority: high high priority task

Comments

@prusnak
Copy link

prusnak commented Oct 18, 2023

I think it should :-)

Both with and without the lightning: prefix

@KKA11010 KKA11010 self-assigned this Oct 18, 2023
@KKA11010 KKA11010 added the enhancement New feature or request label Oct 18, 2023
@DoktorShift
Copy link

i can add it also does not work when copy paste raw LNURL. i tryed both, with and without prefix lightning:

@KKA11010 KKA11010 added the priority: high high priority task label Nov 17, 2023
@dadofsambonzuki
Copy link

+1

Does not scan nor can you paste in the LNURL string.

Screenshot_20240209-135544.png

Screenshot_20240209-135626.png

@KKA11010
Copy link
Collaborator

KKA11010 commented Feb 9, 2024

+1

Does not scan nor can you paste in the LNURL string.

Screenshot_20240209-135544.png

Screenshot_20240209-135626.png

Deez nutz! are unclaimable! 🥲

Will work on a patch asap. Thank you for the message 🧡

@dadofsambonzuki
Copy link

If you can scan this, cashus will literally fall onto my desk.

PXL_20240209_140547628.MP.jpg

PXL_20240209_140745602.MP.jpg

@KKA11010
Copy link
Collaborator

KKA11010 commented Feb 9, 2024

If you can scan this, cashus will literally fall onto my desk.

PXL_20240209_140547628.MP.jpg

PXL_20240209_140745602.MP.jpg

Woahttt 😱😍😍😍

@erskingardner
Copy link

Was poking around at this and that invoice just seems to be invalid.

Am I missing something? I can scan other lightning addresses in eNuts without trouble.

@KKA11010
Copy link
Collaborator

Am I missing something? I can scan other lightning addresses in eNuts without trouble.

Interesting. If you look at the function that is used in the QR scanner screen, you will see that it can't handle the bech32-encoded LNURLs.

  1. It checks the type of code to be a QR code. Line 89
  2. It checks if the data scanned is a cashu token. Line 94
  3. It checks if the data is either a Nostr 'nprofile...' or 'npub...' Line 99 & Line 108
  4. It checks if the data is a URL (try to ping and add a mint url afterwards) Line 113
  5. Try-catch to decode LN invoice 'LNBC...' Line117

The catch part in the 5th point is where users end up because the code fails to decode a 'LNURL...'

@dadofsambonzuki
Copy link

Was poking around at this and that invoice just seems to be invalid.

Am I missing something? I can scan other lightning addresses in eNuts without trouble.

I think that URL is no longer valid as I updated the BitcoinSwitch it's associated with.

@erskingardner
Copy link

The catch part in the 5th point is where users end up because the code fails to decode a 'LNURL...'

Facepalm. I looked through that method but was trying with a LN invoice not an LNurl. If I manage to find some time I'll give it another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: high high priority task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants