Skip to content

Commit 98623aa

Browse files
vincenzopalazzorustyrussell
authored andcommitted
pyln-client: Adding parameter to the listpays rpc method.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
1 parent ee8c725 commit 98623aa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

contrib/pyln-client/pyln/client/lightning.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,15 +931,17 @@ def listnodes(self, node_id=None):
931931
}
932932
return self.call("listnodes", payload)
933933

934-
def listpays(self, bolt11=None, payment_hash=None):
934+
def listpays(self, bolt11=None, payment_hash=None, status=None):
935935
"""
936936
Show outgoing payments, regarding {bolt11} or {payment_hash} if set
937-
Can only specify one of {bolt11} or {payment_hash}.
937+
Can only specify one of {bolt11} or {payment_hash}. It is possible
938+
filter the payments by status.
938939
"""
939940
assert not (bolt11 and payment_hash)
940941
payload = {
941942
"bolt11": bolt11,
942-
"payment_hash": payment_hash
943+
"payment_hash": payment_hash,
944+
"status": status
943945
}
944946
return self.call("listpays", payload)
945947

0 commit comments

Comments
 (0)