Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianoflondon/41662b997a7861fecd72113ee63c02ad to your computer and use it in GitHub Desktop.
Save brianoflondon/41662b997a7861fecd72113ee63c02ad to your computer and use it in GitHub Desktop.
I want to add the str `comment` to the answer but doing all the right
escaping so that I get a string like "api.v4v.app/v1/lnurlp/proxy/callback/"
async addAmountComment (url, amount, comment) {
const firstSeparator = url.includes('?') ? '&' : '?'
const ans = `${url}${firstSeparator}amount=${amount.toString()}`
return ans
},
<a href="lightning:lnbc100...">Pay</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment