Skip to content

Commit e57a55c

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

File tree

1 file changed

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

1 file changed

+4
-9
lines changed

resources/scenarios/ln_framework/ln.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,8 @@ 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:
263-
response = self.post(
264-
"invoice", {"amount_msat": sats * 1000, "label": label, "description": description}
265-
)
262+
def createinvoice(self, sats, label) -> str:
263+
response = self.post("invoice", {"amount_msat": sats * 1000, "label": label})
266264
res = json.loads(response)
267265
return res["bolt11"]
268266

@@ -396,11 +394,8 @@ def update(self, txid_hex: str, policy: dict, capacity: int):
396394
)
397395
return json.loads(res)
398396

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

0 commit comments

Comments
 (0)