Browse Source

Update services.py

internalpayments
Arc 4 years ago
committed by GitHub
parent
commit
1064f2ee15
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lnbits/core/services.py

2
lnbits/core/services.py

@ -27,7 +27,6 @@ def pay_invoice(*, wallet_id: str, bolt11: str, max_sat: Optional[int] = None) -
temp_id = f"temp_{urlsafe_short_hash()}" temp_id = f"temp_{urlsafe_short_hash()}"
try: try:
invoice = bolt11_decode(bolt11) invoice = bolt11_decode(bolt11)
print(invoice.payment_hash)
internal = check_internal(invoice.payment_hash) internal = check_internal(invoice.payment_hash)
if invoice.amount_msat == 0: if invoice.amount_msat == 0:
@ -51,7 +50,6 @@ def pay_invoice(*, wallet_id: str, bolt11: str, max_sat: Optional[int] = None) -
assert wallet, "invalid wallet id" assert wallet, "invalid wallet id"
if wallet.balance_msat < 0: if wallet.balance_msat < 0:
raise PermissionError("Insufficient balance.") raise PermissionError("Insufficient balance.")
print(internal)
if internal: if internal:
create_payment( create_payment(
wallet_id=wallet_id, wallet_id=wallet_id,

Loading…
Cancel
Save