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

feat: add lnurl withdrawal #158

Merged
merged 8 commits into from
Oct 22, 2024
Merged

feat: add lnurl withdrawal #158

merged 8 commits into from
Oct 22, 2024

Conversation

im-adithya
Copy link
Member

@im-adithya im-adithya commented Oct 16, 2024

Fixes #6

Description

Adds LNURL Withdraw

Screenshots

@rolznz
Copy link
Contributor

rolznz commented Oct 17, 2024

@im-adithya nice! what did you use for generating the two different types of vouchers?

@im-adithya
Copy link
Member Author

I'm using the LNURLw plugin from LNBits here (ran an instance for 21 sats, funded the wallet with NWC and installed the plugin and followed this video (make sure you install v0.1.13 otherwise it won't work))

Copy link
Contributor

@reneaaron reneaaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, just did some first testing. 💪

  1. Min & Max amounts
    If it's a dynamic amount lnurl-w (min != max) the UX currently is a bit flawed. I don't know what the min / max values are and the button is just disabled.

What if we do the on "Confirm" and display a toast with the min / max values instead? Since this also needs to be applied to the lnurl-pay flow I guess we can also do it as a follow-up:

#159

  1. Linking
    You already added a todo, please make sure this works as it's quite popular for different services (such as lightsats) to use the lightning:LNURLW link that just takes you to the wallet

@reneaaron reneaaron added this to the 1.7 milestone Oct 17, 2024
@im-adithya
Copy link
Member Author

Addressed ✅

Min & Max amounts

For now I added code to throw error if amount is < min or > max, confirm button won't be disabled

lib/link.ts Show resolved Hide resolved
},

// LNURL-withdraw
"lightning:lnurlw123": { url: "lightning:lnurlw123", path: "/withdraw" },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, thanks @reneaaron 🙌

Copy link
Contributor

@reneaaron reneaaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@reneaaron reneaaron merged commit cb4253e into master Oct 22, 2024
1 check passed
@im-adithya im-adithya deleted the task-lnurl-w branch November 18, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] LNURL-withdraw
3 participants