mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pay: require description if bolt11 only has hash.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: JSON-RPC: `pay` has `description` parameter, will be required if bolt11 only has a hash. Changelog-Deprecated: JSON-RPC: `pay` for a bolt11 which uses a `description_hash`, without setting `description`.
This commit is contained in:
@@ -998,7 +998,7 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
def pay(self, bolt11, msatoshi=None, label=None, riskfactor=None,
|
||||
maxfeepercent=None, retry_for=None,
|
||||
maxdelay=None, exemptfee=None, localofferid=None, exclude=None,
|
||||
maxfee=None):
|
||||
maxfee=None, description=None):
|
||||
"""
|
||||
Send payment specified by {bolt11} with {msatoshi}
|
||||
(ignored if {bolt11} has an amount), optional {label}
|
||||
@@ -1016,6 +1016,7 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
"localofferid": localofferid,
|
||||
"exclude": exclude,
|
||||
"maxfee": maxfee,
|
||||
"description": description,
|
||||
}
|
||||
return self.call("pay", payload)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user