fix undeclared ok error.

This commit is contained in:
fiatjaf
2020-09-06 23:39:46 -03:00
parent ab6229806c
commit 130beaf38a
2 changed files with 3 additions and 3 deletions
+2 -3
View File
@@ -107,9 +107,8 @@ def pay_invoice(
if ok:
create_payment(checking_id=checking_id, fee=fee_msat, **payment_kwargs)
delete_payment(temp_id)
if not ok:
raise Exception(error_message or "Unexpected backend error.")
else:
raise Exception(error_message or "Unexpected backend error.")
return invoice.payment_hash