mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-23 19:54:18 +01:00
fix: falsely reporting Invoice paid
This commit is contained in:
@@ -104,12 +104,13 @@ async def mint(ctx, amount: int, hash: str):
|
|||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
try:
|
try:
|
||||||
await wallet.mint(amount, r["hash"])
|
await wallet.mint(amount, r["hash"])
|
||||||
|
paid = True
|
||||||
|
print("Invoice paid.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(str(e))
|
||||||
if str(e) == "Error: Lightning invoice not paid yet.":
|
if str(e) == "Error: Lightning invoice not paid yet.":
|
||||||
print(".", end="", flush=True)
|
print(".", end="", flush=True)
|
||||||
continue
|
continue
|
||||||
paid = True
|
|
||||||
print(" Invoice paid.")
|
|
||||||
elif amount and hash:
|
elif amount and hash:
|
||||||
await wallet.mint(amount, hash)
|
await wallet.mint(amount, hash)
|
||||||
wallet.status()
|
wallet.status()
|
||||||
|
|||||||
Reference in New Issue
Block a user