mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 10:34:20 +01:00
Mint: Add LndRest and regtest tests (#359)
* update * working * test with lnd * update action * cache poetry * add lndrest * enable regtest * add regtests.yml * poetry version * add helpers * save * run legend regtest fork * actually start * use bash * give rights * remove cache? * change order * tests succeed with lndrestwallet * check if wallet is set * settings for regtest * fix fakewallet test * remove wacky balance check * adjust permissions * try with sudo * adjust example * remove eclair
This commit is contained in:
@@ -210,9 +210,17 @@ async def pay(ctx: Context, invoice: str, yes: bool):
|
||||
help="Split minted tokens with a specific amount.",
|
||||
type=int,
|
||||
)
|
||||
@click.option(
|
||||
"--no-check",
|
||||
"-n",
|
||||
default=False,
|
||||
is_flag=True,
|
||||
help="Do not check if invoice is paid.",
|
||||
type=bool,
|
||||
)
|
||||
@click.pass_context
|
||||
@coro
|
||||
async def invoice(ctx: Context, amount: int, id: str, split: int):
|
||||
async def invoice(ctx: Context, amount: int, id: str, split: int, no_check: bool):
|
||||
wallet: Wallet = ctx.obj["WALLET"]
|
||||
await wallet.load_mint()
|
||||
wallet.status()
|
||||
@@ -236,9 +244,11 @@ async def invoice(ctx: Context, amount: int, id: str, split: int):
|
||||
print(f"Invoice: {invoice.bolt11}")
|
||||
print("")
|
||||
print(
|
||||
"If you abort this you can use this command to recheck the"
|
||||
f" invoice:\ncashu invoice {amount} --id {invoice.id}"
|
||||
"You can use this command to check the invoice: cashu invoice"
|
||||
f" {amount} --id {invoice.id}"
|
||||
)
|
||||
if no_check:
|
||||
return
|
||||
check_until = time.time() + 5 * 60 # check for five minutes
|
||||
print("")
|
||||
print(
|
||||
|
||||
Reference in New Issue
Block a user