Skip to content

Commit

Permalink
pyln-testing: Add listinvoices to grpc shim
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Jul 19, 2022
1 parent 88ae3d5 commit a34a595
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions contrib/pyln-testing/pyln/testing/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,18 @@ def close(
# feerange,
)
return grpc2py.close2py(self.stub.Close(payload))

def listinvoices(
self,
label=None,
payment_hash=None,
invstring=None,
offer_id=None
):
payload = pb.ListinvoicesRequest(
label=label,
invstring=invstring,
payment_hash=unhexlify(payment_hash) if payment_hash else None,
offer_id=offer_id,
)
return grpc2py.listinvoices2py(self.stub.ListInvoices(payload))

0 comments on commit a34a595

Please sign in to comment.