-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
invoices: return payment address and add index from addholdinvoice #5533
invoices: return payment address and add index from addholdinvoice #5533
Conversation
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.
Thanks for the PR. I think the r_hash
doesn't make any sense here. See my comments below.
// EDIT: Maybe I should read the issue this is trying to fix first :/
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.
Just some fixups needed in the rpc changes!
Thanks for the PR! Going to be very useful to have this surfaced.
}{ | ||
PayReq: resp.PaymentRequest, | ||
}) | ||
printRespJSON(resp) |
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.
Btw, this update changes one of the json response items from "pay_req" to "payment_request", as defined in the proto file. I thought it was worth it, to mimic the response from addinvoice, as closely as possible.
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 think that's okay. Hopefully scripts use the gRPC interface directly and don't parse the output of lncli
.
99641f3
to
49094cf
Compare
Code has now been updated. |
49094cf
to
850dee3
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.
LGTM, thanks 🎉
}{ | ||
PayReq: resp.PaymentRequest, | ||
}) | ||
printRespJSON(resp) |
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 think that's okay. Hopefully scripts use the gRPC interface directly and don't parse the output of lncli
.
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.
tACK
$ lncli addholdinvoice 74e03041f676fc0fe3d19980c6b7a06d947fbd91879b02c410fb8bf86cb79025
{
"payment_request": "lnbcrt1ps0d0empp5wnsrqs0kwm7qlc73nxqvddaqdk28l0v3s7ds93qslw9lsm9hjqjsdqqcqzpgxqyz5vqsp5se4cpj3qu29gnwr4xuyntc95q6w4kfk7j7zzx5vhy46pgqyzzx8s9qyyssq9ycn8ul5eugrftulj6wtgmhnge40epetcl5828kxvmsu2yz33huz0eeea28kwn0uhn4cu0pe97y0l45gwnaa0aagvwd8dtt7yx4wpmgpfm7ggk",
"add_index": "11",
"payment_addr": "866b80ca20e28a89b875370935e0b4069d5b26de97842351972574140082118f"
}
Fixes: #4820. This pr extends the response from
addholdinvoice
to mimic that of theaddinvoice
response. It addsAddIndex
andPaymentAddr
toAddHoldInvoiceResp
.Fixes: #4820