thunderhub icon indicating copy to clipboard operation
thunderhub copied to clipboard

Invoices without an amount/with zero amount should be supported.

Open data-retriever opened this issue 2 years ago • 1 comments

Describe the problem/bug Invoices without an amount/with zero amount should be supported.

Your environment

  • Version of ThunderHub: 0.13.16

To Reproduce For invoice creation:

  • Click on Receive on lightning section
  • Try to press 0 key on Amount to receive or just leave it blank
  • Try to Create Invoice

For invoice payment:

  • Create a invoice with lncli addinvoice
  • Click on Send on lightning section and paste the payment_request on Request
  • Try changing the Value field of the decoded invoice

Expected behavior For invoice creation:

  • Pressing 0 on the Amount field should be accepted

For invoice payment:

  • Editing the Value or some prompt should allow the user to specify the amount to be paid

Actual behavior For invoice creation:

  • Create Invoice is only active if Amount to receive > 0

For invoice payment:

  • User is unable to edit value and clicking on Pay will generate a UnexpectedPaymentError. amount must be specified when paying a zero amount invoice

Additional context Sometimes I want to receive a payment but I don't know exactly how much the payer should pay me. For instance, If the payer will charge me the estimated lightning fee (to avoid certain attacks where the receiver creates a expensive route to defraud the sender), then the best would just to generate a invoice with a zero value and let him do all the math. The same logic applies if I'm the one that will pay such invoice.

data-retriever avatar Oct 13 '22 02:10 data-retriever

Yes actively looking for this feature

RajGoodF avatar Jan 09 '23 08:01 RajGoodF