Browse Source

Update clightning.py

fee_issues
Arc 5 years ago
committed by GitHub
parent
commit
77e849f056
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lnbits/wallets/clightning.py

2
lnbits/wallets/clightning.py

@ -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)

Loading…
Cancel
Save