mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
delinvoice: allow desconly arg to only remove the description.
Means that field is now optional in JSON output. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: JSON-RPC: `delinvoice` has a new parameter `desconly` to remove description.
This commit is contained in:
@@ -566,13 +566,14 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
}
|
||||
return self.call("delexpiredinvoice", payload)
|
||||
|
||||
def delinvoice(self, label, status):
|
||||
def delinvoice(self, label, status, desconly=None):
|
||||
"""
|
||||
Delete unpaid invoice {label} with {status}.
|
||||
Delete unpaid invoice {label} with {status} (or, with {desconly} true, remove its description).
|
||||
"""
|
||||
payload = {
|
||||
"label": label,
|
||||
"status": status
|
||||
"status": status,
|
||||
"desconly": desconly,
|
||||
}
|
||||
return self.call("delinvoice", payload)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user