mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
add mutually exclusive bolt11 & payment_hash to listpayments method
This commit is contained in:
parent
72dd1461a0
commit
7101db060b
1 changed files with 7 additions and 3 deletions
|
@ -217,11 +217,15 @@ class LightningRpc(UnixDomainSocketRpc):
|
|||
riskfactor is not None and args.append(riskfactor)
|
||||
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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue