-
Notifications
You must be signed in to change notification settings - Fork 91
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
frontend: handle zero amount invoices when sending with lightning #2571
frontend: handle zero amount invoices when sending with lightning #2571
Conversation
007d584
to
5d15765
Compare
You normally set the description / memo when creating the invoice (receiver side), not when paying the invoice |
5d15765
to
b38b9cf
Compare
Thanks, I expected that it's not possible. I removed the TODO and updated the commit message, thanks @dangeross |
@Beerosagos PTAL |
value={customAmount ? `${customAmount}` : ''} | ||
autoFocus | ||
/> | ||
<Input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This input should be removed, I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept as readonly input so that the user can read the memo/description
await postSendPayment({ | ||
bolt11: paymentDetails.invoice.bolt11, | ||
// amountMsat is optional, if amount is missing the UI shows edit-invoice step for the user to enter a custom amountMsat which is passed here | ||
amountMsat: customAmount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK amountMsat unit is milli satoshi. The amount should be multiplied * 1000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oups 😇
From my tests, the reason of this error is the missing conversion to milli sats: Setting 1000 in the input seems to successfully send a 1sat transaction |
b38b9cf
to
5bfc632
Compare
rebased |
2cc56c1
to
8b2f595
Compare
@Beerosagos PTAL |
Added a new step edit-invoice to allow specifying a custom amount if no amount was given or amount is 0. Other change: - back button on confirm screen goes now back to the lighting view was going back to the QR scanner - changed Sats to Sat so it is consitent with the rest of the app
8b2f595
to
e7a8224
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
partially tested ACK
Added a new step edit-invoice to allow specifying a custom amount if no amount was given or amount is 0.
Other change: