add autopay param

This commit is contained in:
Kieran 2023-05-09 16:28:50 +01:00
parent 241ead7a03
commit 51e6e0984e
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,9 @@ export default function CashuNuts({ token }: { token: string }) {
async function redeemToken(e: React.MouseEvent<HTMLButtonElement>, token: string) {
e.stopPropagation();
const lnurl = profile?.lud16 ?? "";
const url = `https://redeem.cashu.me?token=${encodeURIComponent(token)}&lightning=${encodeURIComponent(lnurl)}`;
const url = `https://redeem.cashu.me?token=${encodeURIComponent(token)}&lightning=${encodeURIComponent(
lnurl
)}&autopay=yes`;
window.open(url, "_blank");
}