update checking message

This commit is contained in:
callebtc
2023-01-30 21:03:11 +01:00
parent 7e39e1b036
commit 75662462b4
2 changed files with 7 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ SOCKS_PORT = env.int("SOCKS_PORT", default=9050)
LIGHTNING = env.bool("LIGHTNING", default=True)
LIGHTNING_FEE_PERCENT = env.float("LIGHTNING_FEE_PERCENT", default=1.0)
assert LIGHTNING_FEE_PERCENT >= 0, "LIGHTNING_FEE_PERCENT must be at least 0"
LIGHTNING_RESERVE_FEE_MIN = env.float("LIGHTNING_RESERVE_FEE_MIN", default=4000)
LIGHTNING_RESERVE_FEE_MIN = env.float("LIGHTNING_RESERVE_FEE_MIN", default=2000)
MINT_PRIVATE_KEY = env.str("MINT_PRIVATE_KEY", default=None)

View File

@@ -166,7 +166,7 @@ async def invoice(ctx: Context, amount: int, hash: str):
print(f"Invoice: {invoice.pr}")
print("")
print(
f"Execute this command if you abort the check:\ncashu invoice {amount} --hash {invoice.hash}"
f"If you abort this you can use this command to recheck the invoice:\ncashu invoice {amount} --hash {invoice.hash}"
)
check_until = time.time() + 5 * 60 # check for five minutes
print("")
@@ -187,6 +187,11 @@ async def invoice(ctx: Context, amount: int, hash: str):
if str(e) == "Error: Lightning invoice not paid yet.":
print(".", end="", flush=True)
continue
if not paid:
print("\n")
print(
"Invoice is not paid yet, stopping check. Use the command above to recheck after the invoice has been paid."
)
elif amount and hash:
await wallet.mint(amount, hash)
wallet.status()