lnbits / withdraw

LNbits Withdraw Extension
MIT License
6 stars 9 forks source link

Change min sat value and max. number of vouchers #21

Closed DoktorShift closed 6 months ago

DoktorShift commented 10 months ago

Issue:

Min. sat value and max. number of vouchers.

My two sats: Today i made some changes to this extension on my own server. I asked myself for a long time "why is max amount of vouchers limited to 250 and why is min. amount 10 sats". It seems random to me. Since i got not a propper answer is played with my own lnbits and changed the values.

If there are no security thoughts behind that values i would argue that we now have the privilege to make small payments and withdrawls down to a piece of a cent. We should use that and change this extension.

Set max numbers of vouchers to 1000 makes it easier to fullfile some larger tables of withdrawls. 1000 even better for the monk inside me. lol

Summary: Changed min. value/withdrawl from 10 sat to 1 sat Changed max. amount of vouchers from 250 to 1000

AxelHamburch commented 10 months ago

Very good, I support that!

I have the technology to start with a Satoshi and should do so. We should leave the fiat era of restrictions behind us.

I can live with 1000 for the time being.

If there are fears that the lower withdrawal limit and the maximum number of withdrawals could be abused, I would rather increase the minimum time between two withdrawals. It is enough for people to request a withdrawal every 10 seconds. But I also believe that 1 second is enough. Every server should be able to cope with that.

mrbpp commented 9 months ago

Great idea! 👏 I support it too. As Axel said, it's time for no barriers. 🚧

AxelHamburch commented 7 months ago

To the developers @dni @arcbtc. Something speaks against this? At least I don't see any reason. I could really use the function.

dni commented 7 months ago

hey! sorry for the long wait, i also have no idea why there are those limitations. if there is a reason for that there should been a comment imho. i have nothing against it.

dni commented 7 months ago

so after talking to ben, the limit was set into place because trying to print out more than 250 QR codes hung peoples computers. can you try that @DoktorShift if printing 1k makes any issues?

DoktorShift commented 7 months ago

so after talking to ben, the limit was set into place because trying to print out more than 250 QR codes hung peoples computers. can you try that @DoktorShift if printing 1k makes any issues?

Oh interessting. I actually never printed, just generated. I will try that tomorrow evening. Do not have a printer available rn.

AxelHamburch commented 7 months ago

so after talking to ben, the limit was set into place because trying to print out more than 250 QR codes hung peoples computers. can you try that @DoktorShift if printing 1k makes any issues?

Ugh... If you try to print out thousands of QR codes at the same time, you shouldn't be surprised if the system crashes. I will integrate the function on my website, where one QR code voucher will then be retrieved from the other. I would have to retrigger the entire 250 voucher, which would be quite annoying since you have to monitor it and constantly update it.

Maybe you can block the print button to a maximum of 250 vouchers? Or you can give an indication that printing is only possible up to a maximum of 250 vouchers.

dni commented 7 months ago

Maybe you can block the print button to a maximum of 250 vouchers? Or you can give an indication that printing is only possible up to a maximum of 250 vouchers.

something like that. not quite sure what is best.

but there at least should be comments in the code why this 250 limit is there.

DoktorShift commented 7 months ago

I tryed yesterday at my companys network. i was able to start the print of 1000 pcs.

But i noticed that there are only 96 pages while each pace should have 10 QR Codes so 100 pages. I then saw that some QR codes are overlapping.

qr codes

I then fixed this by setting the "margins" option to "no margin" in the print settings. It was set to "default margins"

DoktorShift commented 7 months ago

Maybe you can block the print button to a maximum of 250 vouchers? Or you can give an indication that printing is only possible up to a maximum of 250 vouchers.

something like that. not quite sure what is best.

but there at least should be comments in the code why this 250 limit is there.

My solution:

Increase the amount of maximum QR codes and set a small pop up when press "Print" which give some short information that some system could fail printing high amounts of QR codes. In this case give user advice to lower amount of withdraw links.

arcbtc commented 6 months ago

This was reduced to reduce strain on the server. Its not hard to create multiple batches, either through the UI or programmatically