Skip to content

fix: Error decoding some Lightning and LNURL schemes #70

Open

Description

@jvsena42

Had to add this workaround to Android

    private fun String.removeLightningSchemes(): String {
        return this
            .replace(Regex("^lightning:", RegexOption.IGNORE_CASE), "")
            .replace(Regex("^lnurl:", RegexOption.IGNORE_CASE), "")
            .replace(Regex("^lnurlw:", RegexOption.IGNORE_CASE), "")
            .replace(Regex("^lnurlc:", RegexOption.IGNORE_CASE), "")
            .replace(Regex("^lnurlp:", RegexOption.IGNORE_CASE), "")
    }

Activity

  1. changed the title [-]Error decoding some Lightning and LNURL schemes[/-] [+]fix: Error decoding some Lightning and LNURL schemes[/+] on Jul 8, 2026
  2. jvsena42 commented on Nov 20, 2026

    @jvsena42
    MemberAuthor

    The LUD-17 URL form is also not decoded: lnurlp://merchant.example/pay (and lnurlw://, lnurlc://, keyauth://). Stripping the scheme leaves //merchant.example/pay, which matches none of the LNURL predicates in the scanner, so the app shows a decoding error. Per LUD-17 these should be decoded as https://merchant.example/pay (http:// for .onion). Found during review of the NFC payments PRs: synonymdev/bitkit-ios#1302 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions