mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pyln-client: Adding parameter to the listpays rpc method.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
ee8c7252a3
commit
98623aaff8
@@ -931,15 +931,17 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
}
|
||||
return self.call("listnodes", payload)
|
||||
|
||||
def listpays(self, bolt11=None, payment_hash=None):
|
||||
def listpays(self, bolt11=None, payment_hash=None, status=None):
|
||||
"""
|
||||
Show outgoing payments, regarding {bolt11} or {payment_hash} if set
|
||||
Can only specify one of {bolt11} or {payment_hash}.
|
||||
Can only specify one of {bolt11} or {payment_hash}. It is possible
|
||||
filter the payments by status.
|
||||
"""
|
||||
assert not (bolt11 and payment_hash)
|
||||
payload = {
|
||||
"bolt11": bolt11,
|
||||
"payment_hash": payment_hash
|
||||
"payment_hash": payment_hash,
|
||||
"status": status
|
||||
}
|
||||
return self.call("listpays", payload)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user