From 75662462b4f318e337dabc998e9fe259eae0c600 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 30 Jan 2023 21:03:11 +0100 Subject: [PATCH] update checking message --- cashu/core/settings.py | 2 +- cashu/wallet/cli.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cashu/core/settings.py b/cashu/core/settings.py index a5ce28c..a9ca5c6 100644 --- a/cashu/core/settings.py +++ b/cashu/core/settings.py @@ -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) diff --git a/cashu/wallet/cli.py b/cashu/wallet/cli.py index 9edb7a2..c1bafdf 100644 --- a/cashu/wallet/cli.py +++ b/cashu/wallet/cli.py @@ -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()