lnbits / withdraw

LNbits Withdraw Extension
MIT License
6 stars 9 forks source link

Fix updating the uses #6

Closed talvasconcelos closed 11 months ago

talvasconcelos commented 1 year ago

Properly update the usescsv in DB and links CSV export, to handle increasing the number of uses.

Test scenario

Previously when editing/updating the number of uses of an LNURLw the number of uses in the DB would get screwed and links would get buggy!

Steps:

  1. Create a withdraw link (check CSV table)
  2. Use it a couple of times
  3. Edit the withdraw lnurl to increase the number of uses (re- check CSV table)

Expected result: The links should have updated the number of uses, keeping the previous count. The CSV should have the correct amount of unique LNURL's

motorina0 commented 1 year ago

Please add a test scenario. Not sure what is the correct expected result. Eg:

Test Scenario

Test that bla bla Steps:

  1. Create a new withdraw link...
  2. ...

Expected Result:

talvasconcelos commented 11 months ago

@motorina0 also this one can be merged!