lightning-browser-extension
lightning-browser-extension copied to clipboard
Linear min & max sats buttons
Describe the changes you have made in this PR
Sats buttons 4 linear values from min to max, with nice rounding & formating. min & max values are unchanged.
Type of change
feat: New feature (non-breaking change which adds functionality)
Checklist
- [x] Self-review of changed code
- [x] Manual testing
- [ ] Added automated tests where applicable
- [ ] Update Docs & Guides
- For UI-related changes
- [x] Darkmode
- [x] Responsive layout
can you please try and fix code quality checks in the code?
@matjaz I don't think a linear distribution of the amounts between min and max is what I would want as a user. When I tip someone I use those buttons as kind of shortcuts for smaller amounts.
I don't think people would use a 1M sat button a lot, do you? :thinking:
Using LNURL, LN SERVICE specify min & max. So it's up to service what values they want.
Example I was considering is service balance withdrawal where max is balance.
When you tip someone you don't use LNURL (no min&max). When min & max are not specified it fallbacks to current values(1k, 5k 10k, 25k).
There is no point of having disabled buttons.
What do you suggest, @reneaaron ?
@pavanjoshi914 fixed formatting.
Example I was considering is service balance withdrawal where max is balance.
Ahh, okay. I wasn't considering this screen. Can you share the use case (and app) where you would think this would improve the flow for the user?
The problem could be here that you won't be able to withdraw the full amount for most of the services. (they keep a little reserve to protect themselves from fee draining attacks)
I think there are basically 2 use cases where those buttons are in use currently:
- LNURL-pay (paying to some other LNURL)
- makeInvoice (e.g. withdrawing from a service)
When you tip someone you don't use LNURL (no min&max).
Every lightning address is a LNURL :thinking: (e.g. also your lightning address has min and max values defined)
https://lntictactoe.com & https://www.lnflip.com enables balance withdrawal. They also have built-in fees which covers withdrawal fees. Probably they also have throttling for withdrawals.
Let's say user has a balance of 2500 sats, most of the buttons are disabled. For 150000 sats button values are too low.
So for tag
- payRequest, Alby could have a max value of wallet balance or
LNURLmaxSendable - withdrawRequest,
LN SERVICEdefinesmaxWithdrawable
Any feedback on this? I don't see the point in buttons with higher values than available. For both, payRequest and withdrawRequest.