Last active
June 5, 2022 17:11
-
-
Save brianoflondon/41662b997a7861fecd72113ee63c02ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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