From eca9e95d3e862fab867c7d3b193d6fc6f49b4344 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Fri, 7 Oct 2022 22:53:34 +0300 Subject: [PATCH] fix: falsely reporting `Invoice paid` --- cashu/wallet/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cashu/wallet/cli.py b/cashu/wallet/cli.py index 39086ac..b11d9b1 100755 --- a/cashu/wallet/cli.py +++ b/cashu/wallet/cli.py @@ -104,12 +104,13 @@ async def mint(ctx, amount: int, hash: str): time.sleep(3) try: await wallet.mint(amount, r["hash"]) + paid = True + print("Invoice paid.") except Exception as e: + print(str(e)) if str(e) == "Error: Lightning invoice not paid yet.": print(".", end="", flush=True) continue - paid = True - print(" Invoice paid.") elif amount and hash: await wallet.mint(amount, hash) wallet.status()