From 570534510ea867e8a70d799418375df5a6eae7df Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 3 Oct 2022 20:25:54 +0200 Subject: [PATCH] fix lock --- cashu/wallet/cli.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cashu/wallet/cli.py b/cashu/wallet/cli.py index 09605bb..ab583f2 100755 --- a/cashu/wallet/cli.py +++ b/cashu/wallet/cli.py @@ -127,16 +127,16 @@ async def send(ctx, amount: int, lock: str): @click.option("--lock", "-l", default=None, help="Unlock coins.", type=str) @click.pass_context @coro -async def receive(ctx, coin: str, unlock: str): +async def receive(ctx, coin: str, lock: str): wallet: Wallet = ctx.obj["WALLET"] wallet.load_mint() wallet.status() - if unlock: + if lock: # load the script and signature of this address from the database - assert len(unlock.split("P2SH:")) == 2, Exception( + assert len(lock.split("P2SH:")) == 2, Exception( "lock has wrong format. Expected P2SH:
." ) - address_split = unlock.split("P2SH:")[1] + address_split = lock.split("P2SH:")[1] p2shscripts = await get_unused_locks(address_split, db=wallet.db) assert len(p2shscripts) == 1