-
Notifications
You must be signed in to change notification settings - Fork 123
lndclient: add lookup invoice #208
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
lndclient: add lookup invoice #208
Conversation
guggero
left a comment
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.
utACK, LGTM 💯
lndclient/lightning_client.go
Outdated
| AddInvoice(ctx context.Context, in *invoicesrpc.AddInvoiceData) ( | ||
| lntypes.Hash, string, error) | ||
|
|
||
| // LookupInvoice looks up an invoice. |
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.
nit: ...looks up an invoice by its hash. ?
lndclient/lightning_client.go
Outdated
| type Invoice struct { | ||
| // Preimage is the invoice's preimage, which is set if the invoice | ||
| // is settled. | ||
| Preiamge *lntypes.Preimage |
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.
nit: typo
ee88eb4 to
dc489d3
Compare
bhandras
left a comment
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 🥇
test/lightning_client_mock.go
Outdated
| Hash: hash, | ||
| PaymentRequest: payReqString, | ||
| Amount: in.Value, | ||
| CreationDate: time.Now(), |
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.
nit: you could just fill creationDate here as it already is set to time.Now() earlier (also it's probably better to use that).
Track the invoices we create with AddInvoice so that we can realistically lookup and settle with the mock.
dc489d3 to
a57e34c
Compare
No description provided.