diff --git a/cashu/wallet/cli/cli.py b/cashu/wallet/cli/cli.py index f4e7322..07b4b6e 100644 --- a/cashu/wallet/cli/cli.py +++ b/cashu/wallet/cli/cli.py @@ -396,7 +396,9 @@ async def receive(ctx: Context, token: str, lock: str): @click.option( "--nostr", "-n", default=False, is_flag=True, help="Receive tokens via nostr." ) -@click.option("--all", "-a", default=False, is_flag=True, help="Receive all pending tokens.") +@click.option( + "--all", "-a", default=False, is_flag=True, help="Receive all pending tokens." +) @click.option( "--verbose", "-v", @@ -407,7 +409,9 @@ async def receive(ctx: Context, token: str, lock: str): ) @click.pass_context @coro -async def receive_cli(ctx: Context, token: str, lock: str, nostr: bool, all: bool, verbose: bool): +async def receive_cli( + ctx: Context, token: str, lock: str, nostr: bool, all: bool, verbose: bool +): wallet: Wallet = ctx.obj["WALLET"] wallet.status() if token: @@ -464,8 +468,15 @@ async def burn(ctx: Context, token: str, all: bool, force: bool): help="Print legacy token without mint information.", type=bool, ) -@click.option("--number", "-n", default=None, help='Show only n pending tokens.', type=int) -@click.option("--offset", default=0, help='Show pending tokens only starting from offset.', type=int) +@click.option( + "--number", "-n", default=None, help="Show only n pending tokens.", type=int +) +@click.option( + "--offset", + default=0, + help="Show pending tokens only starting from offset.", + type=int, +) @click.pass_context @coro async def pending(ctx: Context, legacy, number: int, offset: int): @@ -476,8 +487,15 @@ async def pending(ctx: Context, legacy, number: int, offset: int): sorted_proofs = sorted(reserved_proofs, key=itemgetter("send_id")) # type: ignore if number: number += offset - for i, (key, value) in islice(enumerate( - groupby(sorted_proofs, key=itemgetter("send_id"),)), offset, number + for i, (key, value) in islice( + enumerate( + groupby( + sorted_proofs, + key=itemgetter("send_id"), + ) + ), + offset, + number, ): grouped_proofs = list(value) token = await wallet.serialize_proofs(grouped_proofs) diff --git a/pyproject.toml b/pyproject.toml index 6638d00..93fa906 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,5 +51,5 @@ build-backend = "poetry.core.masonry.api" [tool.poetry.scripts] mint = "cashu.mint.main:main" -cashu = "cashu.wallet.cli:cli" +cashu = "cashu.wallet.cli.cli:cli" wallet-test = "tests.test_wallet:test" \ No newline at end of file