Skip to content
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

feat: add list transactions to nwc #164

Merged
merged 20 commits into from
Dec 18, 2023
Merged

feat: add list transactions to nwc #164

merged 20 commits into from
Dec 18, 2023

Conversation

im-adithya
Copy link
Member

@im-adithya im-adithya commented Nov 22, 2023

fixes #175
Adds list_transactions method

alby.go Outdated Show resolved Hide resolved
alby.go Show resolved Hide resolved
models.go Outdated Show resolved Hide resolved
lnd.go Outdated
if err != nil {
return nil, err
}
resp, err := svc.client.ListInvoices(ctx, &lnrpc.ListInvoiceRequest{NumMaxInvoices: maxInvoices, IndexOffset: indexOffset})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we still need to add support here for from, until, unpaid, is that right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup

alby.go Outdated Show resolved Hide resolved
models.go Outdated Show resolved Hide resolved
models.go Outdated Show resolved Hide resolved
service_test.go Outdated
func (mln *MockLn) LookupInvoice(ctx context.Context, senderPubkey string, paymentHash string) (invoice string, paid bool, err error) {
return mockInvoice, false, nil
}

func (mln *MockLn) ListInvoices(ctx context.Context, senderPubkey, from, until, limit, offset string) (invoices []*Invoice, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests seem missing in this PR

@im-adithya im-adithya changed the title feat: add list invoices to nwc feat: add list transactions to nwc Dec 11, 2023
@im-adithya im-adithya marked this pull request as ready for review December 11, 2023 09:54
@rolznz
Copy link
Contributor

rolznz commented Dec 12, 2023

@im-adithya we still need list_payments and list_invoices (they are part of the spec), it's just we probably won't use them in the extension.

Let's get this merged first though and then re-add them based off it? what do you think?

Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@rolznz rolznz requested a review from bumi December 15, 2023 09:52
@rolznz rolznz requested review from frnandu and reneaaron December 15, 2023 09:52
Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@rolznz rolznz merged commit 01087c3 into main Dec 18, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make_invoice and lookup_invoice do not match spec
2 participants