Skip to content

Commit d8f7259

Browse files
committed
lnd createinvoice: drop description
it's supposed to be a 32-byte hash anyway
1 parent 08cb3e4 commit d8f7259

File tree

1 file changed

+4
-5
lines changed
  • resources/scenarios/ln_framework

1 file changed

+4
-5
lines changed

resources/scenarios/ln_framework/ln.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ def channel(self, pk, capacity, push_amt, fee_rate) -> dict:
259259
res = json.loads(response)
260260
return {"txid": res["txid"], "outpoint": f"{res['txid']}:{res['outnum']}"}
261261

262-
def createinvoice(self, sats, label, description="new invoice") -> str:
262+
def createinvoice(self, sats, label) -> str:
263263
response = self.post(
264-
"invoice", {"amount_msat": sats * 1000, "label": label, "description": description}
264+
"invoice", {"amount_msat": sats * 1000, "label": label}
265265
)
266266
res = json.loads(response)
267267
return res["bolt11"]
@@ -396,10 +396,9 @@ def update(self, txid_hex: str, policy: dict, capacity: int):
396396
)
397397
return json.loads(res)
398398

399-
def createinvoice(self, sats, label, description="new invoice") -> str:
400-
b64_desc = base64.b64encode(description.encode("utf-8"))
399+
def createinvoice(self, sats, label) -> str:
401400
response = self.post(
402-
"/v1/invoices", data={"value": sats, "memo": label, "description_hash": b64_desc}
401+
"/v1/invoices", data={"value": sats, "memo": label}
403402
)
404403
res = json.loads(response)
405404
return res["payment_request"]

0 commit comments

Comments
 (0)