Update clightning.py
This commit is contained in:
@@ -10,10 +10,8 @@ class CLightningWallet(Wallet):
|
|||||||
self.l1 = LightningRpc(getenv("CLIGHTNING_RPC"))
|
self.l1 = LightningRpc(getenv("CLIGHTNING_RPC"))
|
||||||
|
|
||||||
def create_invoice(self, amount: int, memo: str = "") -> InvoiceResponse:
|
def create_invoice(self, amount: int, memo: str = "") -> InvoiceResponse:
|
||||||
print(self.l1)
|
|
||||||
label = "lbl{}".format(random.random())
|
label = "lbl{}".format(random.random())
|
||||||
r = self.l1.invoice(amount*1000, label, memo, exposeprivatechannels=True)
|
r = self.l1.invoice(amount*1000, label, memo, exposeprivatechannels=True)
|
||||||
print(r)
|
|
||||||
ok, checking_id, payment_request, error_message = True, r["payment_hash"], r["bolt11"], None
|
ok, checking_id, payment_request, error_message = True, r["payment_hash"], r["bolt11"], None
|
||||||
return InvoiceResponse(ok, checking_id, payment_request, error_message)
|
return InvoiceResponse(ok, checking_id, payment_request, error_message)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user