mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 08:34:20 +01:00
add mutually exclusive bolt11 & payment_hash to listpayments method
This commit is contained in:
committed by
Christian Decker
parent
72dd1461a0
commit
7101db060b
@@ -217,11 +217,15 @@ class LightningRpc(UnixDomainSocketRpc):
|
|||||||
riskfactor is not None and args.append(riskfactor)
|
riskfactor is not None and args.append(riskfactor)
|
||||||
return self._call("pay", args=args)
|
return self._call("pay", args=args)
|
||||||
|
|
||||||
def listpayments(self):
|
def listpayments(self, bolt11=None, payment_hash=None):
|
||||||
"""
|
"""
|
||||||
Show outgoing payments
|
Show outgoing payments, regarding {bolt11} or {payment_hash} if set
|
||||||
|
Can only specify one of {bolt11} or {payment_hash}
|
||||||
"""
|
"""
|
||||||
return self._call("listpayments")
|
args = []
|
||||||
|
bolt11 and args.append(bolt11)
|
||||||
|
payment_hash and args.append(payment_hash) if args else args.extend([bolt11, payment_hash])
|
||||||
|
return self._call("listpayments", args=args)
|
||||||
|
|
||||||
def connect(self, peer_id, host=None, port=None):
|
def connect(self, peer_id, host=None, port=None):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user