mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-02-02 23:34:21 +01:00
update checking message
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user